From 3e57e127578b89e4d27065934616f0224a2c56b8 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Wed, 29 Jul 2020 23:08:23 -0700 Subject: [PATCH 1/6] Generate client and remove tests directory --- kubernetes/.gitlab-ci.yml | 33 ++++++++ kubernetes/README.md | 2 +- kubernetes/__init__.py | 2 +- kubernetes/__init__.py-e | 24 ++++++ kubernetes/client/__init__.py | 2 +- kubernetes/client/api/custom_objects_api.py | 12 +-- kubernetes/client/api_client.py | 2 +- kubernetes/client/apis/__init__.py | 13 ---- kubernetes/client/configuration.py | 2 +- kubernetes/setup.cfg | 2 + kubernetes/test/test_api_client.py | 25 ------- scripts/constants.py | 2 +- setup.py | 2 +- setup.py-e | 83 +++++++++++++++++++++ 14 files changed, 155 insertions(+), 51 deletions(-) create mode 100644 kubernetes/.gitlab-ci.yml create mode 100644 kubernetes/__init__.py-e delete mode 100644 kubernetes/client/apis/__init__.py create mode 100644 kubernetes/setup.cfg delete mode 100644 kubernetes/test/test_api_client.py create mode 100644 setup.py-e diff --git a/kubernetes/.gitlab-ci.yml b/kubernetes/.gitlab-ci.yml new file mode 100644 index 000000000..3c5125d39 --- /dev/null +++ b/kubernetes/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.nosetest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=client + +nosetest-2.7: + extends: .nosetest + image: python:2.7-alpine +nosetest-3.3: + extends: .nosetest + image: python:3.3-alpine +nosetest-3.4: + extends: .nosetest + image: python:3.4-alpine +nosetest-3.5: + extends: .nosetest + image: python:3.5-alpine +nosetest-3.6: + extends: .nosetest + image: python:3.6-alpine +nosetest-3.7: + extends: .nosetest + image: python:3.7-alpine +nosetest-3.8: + extends: .nosetest + image: python:3.8-alpine diff --git a/kubernetes/README.md b/kubernetes/README.md index 1ca0c3b5e..1305f5814 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: release-1.16 -- Package version: 12.0.0-snapshot +- Package version: 12.0.0a1 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/kubernetes/__init__.py b/kubernetes/__init__.py index 3cd12e801..cc1742a33 100644 --- a/kubernetes/__init__.py +++ b/kubernetes/__init__.py @@ -14,7 +14,7 @@ __project__ = 'kubernetes' # The version is auto-updated. Please do not edit. -__version__ = "12.0.0-snapshot" +__version__ = "12.0.0a1" import kubernetes.client import kubernetes.config diff --git a/kubernetes/__init__.py-e b/kubernetes/__init__.py-e new file mode 100644 index 000000000..3cd12e801 --- /dev/null +++ b/kubernetes/__init__.py-e @@ -0,0 +1,24 @@ +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__project__ = 'kubernetes' +# The version is auto-updated. Please do not edit. +__version__ = "12.0.0-snapshot" + +import kubernetes.client +import kubernetes.config +import kubernetes.dynamic +import kubernetes.watch +import kubernetes.stream +import kubernetes.utils diff --git a/kubernetes/client/__init__.py b/kubernetes/client/__init__.py index 3159d9534..7d9b48d4f 100644 --- a/kubernetes/client/__init__.py +++ b/kubernetes/client/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "12.0.0-snapshot" +__version__ = "12.0.0a1" # import apis into sdk package from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi diff --git a/kubernetes/client/api/custom_objects_api.py b/kubernetes/client/api/custom_objects_api.py index 1186b0a0f..00ba8e206 100644 --- a/kubernetes/client/api/custom_objects_api.py +++ b/kubernetes/client/api/custom_objects_api.py @@ -2405,7 +2405,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -2574,7 +2574,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -2743,7 +2743,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -2921,7 +2921,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -3099,7 +3099,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + ['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -3277,7 +3277,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + ['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 diff --git a/kubernetes/client/api_client.py b/kubernetes/client/api_client.py index ef56f4eb7..814869383 100644 --- a/kubernetes/client/api_client.py +++ b/kubernetes/client/api_client.py @@ -78,7 +78,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/12.0.0-snapshot/python' + self.user_agent = 'OpenAPI-Generator/12.0.0a1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/kubernetes/client/apis/__init__.py b/kubernetes/client/apis/__init__.py deleted file mode 100644 index ca4b321de..000000000 --- a/kubernetes/client/apis/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -from __future__ import absolute_import -import warnings - -# flake8: noqa - -# alias kubernetes.client.api package and print deprecation warning -from kubernetes.client.api import * - -warnings.filterwarnings('default', module='kubernetes.client.apis') -warnings.warn( - "The package kubernetes.client.apis is renamed and deprecated, use kubernetes.client.api instead (please note that the trailing s was removed).", - DeprecationWarning -) diff --git a/kubernetes/client/configuration.py b/kubernetes/client/configuration.py index ac926fc09..e87e18f62 100644 --- a/kubernetes/client/configuration.py +++ b/kubernetes/client/configuration.py @@ -347,7 +347,7 @@ class Configuration(object): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: release-1.16\n"\ - "SDK Package Version: 12.0.0-snapshot".\ + "SDK Package Version: 12.0.0a1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/kubernetes/setup.cfg b/kubernetes/setup.cfg new file mode 100644 index 000000000..11433ee87 --- /dev/null +++ b/kubernetes/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/kubernetes/test/test_api_client.py b/kubernetes/test/test_api_client.py deleted file mode 100644 index f0a9416cf..000000000 --- a/kubernetes/test/test_api_client.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - - -import atexit -import weakref -import unittest - -import kubernetes - - -class TestApiClient(unittest.TestCase): - - def test_context_manager_closes_threadpool(self): - with kubernetes.client.ApiClient() as client: - self.assertIsNotNone(client.pool) - pool_ref = weakref.ref(client._pool) - self.assertIsNotNone(pool_ref()) - self.assertIsNone(pool_ref()) - - def test_atexit_closes_threadpool(self): - client = kubernetes.client.ApiClient() - self.assertIsNotNone(client.pool) - self.assertIsNotNone(client._pool) - atexit._run_exitfuncs() - self.assertIsNone(client._pool) diff --git a/scripts/constants.py b/scripts/constants.py index 18b68ea62..b19d17105 100644 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -18,7 +18,7 @@ import sys KUBERNETES_BRANCH = "release-1.16" # client version for packaging and releasing. -CLIENT_VERSION = "12.0.0-snapshot" +CLIENT_VERSION = "12.0.0a1" # Name of the release package PACKAGE_NAME = "kubernetes" diff --git a/setup.py b/setup.py index 22ec5b69a..e55c3ea76 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ from setuptools import setup # Do not edit these constants. They will be updated automatically # by scripts/update-client.sh. -CLIENT_VERSION = "12.0.0-snapshot" +CLIENT_VERSION = "12.0.0a1" PACKAGE_NAME = "kubernetes" DEVELOPMENT_STATUS = "3 - Alpha" diff --git a/setup.py-e b/setup.py-e new file mode 100644 index 000000000..e55c3ea76 --- /dev/null +++ b/setup.py-e @@ -0,0 +1,83 @@ +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from setuptools import setup + +# Do not edit these constants. They will be updated automatically +# by scripts/update-client.sh. +CLIENT_VERSION = "12.0.0a1" +PACKAGE_NAME = "kubernetes" +DEVELOPMENT_STATUS = "3 - Alpha" + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +EXTRAS = { + 'adal': ['adal>=1.0.2'] +} +REQUIRES = [] +with open('requirements.txt') as f: + for line in f: + line, _, _ = line.partition('#') + line = line.strip() + if ';' in line: + requirement, _, specifier = line.partition(';') + for_specifier = EXTRAS.setdefault(':{}'.format(specifier), []) + for_specifier.append(requirement) + else: + REQUIRES.append(line) + +with open('test-requirements.txt') as f: + TESTS_REQUIRES = f.readlines() + +setup( + name=PACKAGE_NAME, + version=CLIENT_VERSION, + description="Kubernetes python client", + author_email="", + author="Kubernetes", + license="Apache License Version 2.0", + url="https://github.com/kubernetes-client/python", + keywords=["Swagger", "OpenAPI", "Kubernetes"], + install_requires=REQUIRES, + tests_require=TESTS_REQUIRES, + extras_require=EXTRAS, + packages=['kubernetes', 'kubernetes.client', 'kubernetes.config', + 'kubernetes.watch', 'kubernetes.client.api', + 'kubernetes.stream', 'kubernetes.client.models', + 'kubernetes.utils', 'kubernetes.client.apis', + 'kubernetes.dynamic'], + include_package_data=True, + long_description="Python client for kubernetes http://kubernetes.io/", + classifiers=[ + "Development Status :: %s" % DEVELOPMENT_STATUS, + "Topic :: Utilities", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + ], +) From e36e95597b09d45ebe361369aa6eb254c95ee5c7 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Wed, 29 Jul 2020 23:09:32 -0700 Subject: [PATCH 2/6] Cherry-pick hotfixes --- kubernetes/client/api/custom_objects_api.py | 12 +++++----- kubernetes/client/apis/__init__.py | 13 +++++++++++ kubernetes/test/test_api_client.py | 25 +++++++++++++++++++++ 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 kubernetes/client/apis/__init__.py create mode 100644 kubernetes/test/test_api_client.py diff --git a/kubernetes/client/api/custom_objects_api.py b/kubernetes/client/api/custom_objects_api.py index 00ba8e206..1186b0a0f 100644 --- a/kubernetes/client/api/custom_objects_api.py +++ b/kubernetes/client/api/custom_objects_api.py @@ -2405,7 +2405,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 + ['application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -2574,7 +2574,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 + ['application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -2743,7 +2743,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 + ['application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -2921,7 +2921,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501 + ['application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -3099,7 +3099,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + ['application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 @@ -3277,7 +3277,7 @@ class CustomObjectsApi(object): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + ['application/merge-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 diff --git a/kubernetes/client/apis/__init__.py b/kubernetes/client/apis/__init__.py new file mode 100644 index 000000000..ca4b321de --- /dev/null +++ b/kubernetes/client/apis/__init__.py @@ -0,0 +1,13 @@ +from __future__ import absolute_import +import warnings + +# flake8: noqa + +# alias kubernetes.client.api package and print deprecation warning +from kubernetes.client.api import * + +warnings.filterwarnings('default', module='kubernetes.client.apis') +warnings.warn( + "The package kubernetes.client.apis is renamed and deprecated, use kubernetes.client.api instead (please note that the trailing s was removed).", + DeprecationWarning +) diff --git a/kubernetes/test/test_api_client.py b/kubernetes/test/test_api_client.py new file mode 100644 index 000000000..f0a9416cf --- /dev/null +++ b/kubernetes/test/test_api_client.py @@ -0,0 +1,25 @@ +# coding: utf-8 + + +import atexit +import weakref +import unittest + +import kubernetes + + +class TestApiClient(unittest.TestCase): + + def test_context_manager_closes_threadpool(self): + with kubernetes.client.ApiClient() as client: + self.assertIsNotNone(client.pool) + pool_ref = weakref.ref(client._pool) + self.assertIsNotNone(pool_ref()) + self.assertIsNone(pool_ref()) + + def test_atexit_closes_threadpool(self): + client = kubernetes.client.ApiClient() + self.assertIsNotNone(client.pool) + self.assertIsNotNone(client._pool) + atexit._run_exitfuncs() + self.assertIsNone(client._pool) From 40bd9f1c3d3689a6c3f1aab7e60944d3492f1d21 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Wed, 29 Jul 2020 23:12:18 -0700 Subject: [PATCH 3/6] Remove gitlab yml file --- kubernetes/.gitlab-ci.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 kubernetes/.gitlab-ci.yml diff --git a/kubernetes/.gitlab-ci.yml b/kubernetes/.gitlab-ci.yml deleted file mode 100644 index 3c5125d39..000000000 --- a/kubernetes/.gitlab-ci.yml +++ /dev/null @@ -1,33 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.nosetest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=client - -nosetest-2.7: - extends: .nosetest - image: python:2.7-alpine -nosetest-3.3: - extends: .nosetest - image: python:3.3-alpine -nosetest-3.4: - extends: .nosetest - image: python:3.4-alpine -nosetest-3.5: - extends: .nosetest - image: python:3.5-alpine -nosetest-3.6: - extends: .nosetest - image: python:3.6-alpine -nosetest-3.7: - extends: .nosetest - image: python:3.7-alpine -nosetest-3.8: - extends: .nosetest - image: python:3.8-alpine From f8b24b81d6095077e07efff8aa1e49d9febfb5d8 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Wed, 29 Jul 2020 23:15:34 -0700 Subject: [PATCH 4/6] Update README --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 50a2b8029..4fedd918b 100644 --- a/README.md +++ b/README.md @@ -82,11 +82,11 @@ supported versions of Kubernetes clusters. #### Compatibility matrix -| | Kubernetes 1.13 | Kubernetes 1.14 | Kubernetes 1.15 | +| | Kubernetes 1.14 | Kubernetes 1.15 | Kubernetes 1.16 | |--------------------|-----------------|-----------------|-----------------| -| client-python 9.0 |✓ |+- |+- | -| client-python 10.0 |+- |✓ |+- | -| client-python 11.0 |+- |+- |✓ | +| client-python 10.0 |✓ |+- |+- | +| client-python 11.0 |+- |✓ |+- | +| client-python 12.0 |+- |+- |✓ | | client-python HEAD |+- |+- |+- | Key: @@ -115,11 +115,12 @@ between client-python versions. | 8.0 Alpha/Beta | Kubernetes main repo, 1.12 branch | ✗ | | 8.0 | Kubernetes main repo, 1.12 branch | ✗ | | 9.0 Alpha/Beta | Kubernetes main repo, 1.13 branch | ✗ | -| 9.0 | Kubernetes main repo, 1.13 branch | ✓ | +| 9.0 | Kubernetes main repo, 1.13 branch | ✗ | | 10.0 Alpha/Beta | Kubernetes main repo, 1.14 branch | ✗ | | 10.0 | Kubernetes main repo, 1.14 branch | ✓ | | 11.0 Alpha/Beta | Kubernetes main repo, 1.15 branch | ✗ | | 11.0 | Kubernetes main repo, 1.15 branch | ✓ | +| 12.0 Alpha/Beta | Kubernetes main repo, 1.16 branch | ✓ | Key: From e700e97fd1cc84b9b87d40d93ab4c9e417051670 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Thu, 30 Jul 2020 11:07:08 -0700 Subject: [PATCH 5/6] Remove py-e files --- kubernetes/__init__.py-e | 24 ------------ setup.py-e | 83 ---------------------------------------- 2 files changed, 107 deletions(-) delete mode 100644 kubernetes/__init__.py-e delete mode 100644 setup.py-e diff --git a/kubernetes/__init__.py-e b/kubernetes/__init__.py-e deleted file mode 100644 index 3cd12e801..000000000 --- a/kubernetes/__init__.py-e +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -__project__ = 'kubernetes' -# The version is auto-updated. Please do not edit. -__version__ = "12.0.0-snapshot" - -import kubernetes.client -import kubernetes.config -import kubernetes.dynamic -import kubernetes.watch -import kubernetes.stream -import kubernetes.utils diff --git a/setup.py-e b/setup.py-e deleted file mode 100644 index e55c3ea76..000000000 --- a/setup.py-e +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from setuptools import setup - -# Do not edit these constants. They will be updated automatically -# by scripts/update-client.sh. -CLIENT_VERSION = "12.0.0a1" -PACKAGE_NAME = "kubernetes" -DEVELOPMENT_STATUS = "3 - Alpha" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -EXTRAS = { - 'adal': ['adal>=1.0.2'] -} -REQUIRES = [] -with open('requirements.txt') as f: - for line in f: - line, _, _ = line.partition('#') - line = line.strip() - if ';' in line: - requirement, _, specifier = line.partition(';') - for_specifier = EXTRAS.setdefault(':{}'.format(specifier), []) - for_specifier.append(requirement) - else: - REQUIRES.append(line) - -with open('test-requirements.txt') as f: - TESTS_REQUIRES = f.readlines() - -setup( - name=PACKAGE_NAME, - version=CLIENT_VERSION, - description="Kubernetes python client", - author_email="", - author="Kubernetes", - license="Apache License Version 2.0", - url="https://github.com/kubernetes-client/python", - keywords=["Swagger", "OpenAPI", "Kubernetes"], - install_requires=REQUIRES, - tests_require=TESTS_REQUIRES, - extras_require=EXTRAS, - packages=['kubernetes', 'kubernetes.client', 'kubernetes.config', - 'kubernetes.watch', 'kubernetes.client.api', - 'kubernetes.stream', 'kubernetes.client.models', - 'kubernetes.utils', 'kubernetes.client.apis', - 'kubernetes.dynamic'], - include_package_data=True, - long_description="Python client for kubernetes http://kubernetes.io/", - classifiers=[ - "Development Status :: %s" % DEVELOPMENT_STATUS, - "Topic :: Utilities", - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - ], -) From 9da9a6dd981bdfcd03c9fc4c0c86235c2530cf6f Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Thu, 30 Jul 2020 12:47:24 -0700 Subject: [PATCH 6/6] Minor fixes --- CHANGELOG.md | 2 +- kubernetes/setup.cfg | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 kubernetes/setup.cfg diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be706597..ba6df3695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# v12.0.0a1-snapshot +# v12.0.0a1 Kubernetes API Version: 1.16.14 diff --git a/kubernetes/setup.cfg b/kubernetes/setup.cfg deleted file mode 100644 index 11433ee87..000000000 --- a/kubernetes/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99