From 77a504e294cd3e0bf95245ae06fa90b3cf95a476 Mon Sep 17 00:00:00 2001 From: mbohlool Date: Tue, 3 Oct 2017 13:07:48 -0700 Subject: [PATCH] Fix exec example to use new configuration model --- examples/exec.py | 6 ++++-- setup.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/exec.py b/examples/exec.py index 7dade408a..0fe7d5b78 100644 --- a/examples/exec.py +++ b/examples/exec.py @@ -1,13 +1,15 @@ import time from kubernetes import config -from kubernetes.client import configuration +from kubernetes.client import Configuration from kubernetes.client.apis import core_v1_api from kubernetes.client.rest import ApiException from kubernetes.stream import stream config.load_kube_config() -configuration.assert_hostname = False +c = Configuration() +c.assert_hostname = False +Configuration.set_default(c) api = core_v1_api.CoreV1Api() name = 'busybox-test' diff --git a/setup.py b/setup.py index a2d96be5e..64f7d395c 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ setup( tests_require=TESTS_REQUIRES, packages=['kubernetes', 'kubernetes.client', 'kubernetes.config', 'kubernetes.watch', 'kubernetes.client.apis', - 'kubernetes.client.models', 'kubernetes.stream'], + 'kubernetes.stream', 'kubernetes.client.models'], include_package_data=True, long_description="""\ Python client for kubernetes http://kubernetes.io/