diff --git a/kubernetes/README.md b/kubernetes/README.md index 13f212695..bc6861ad9 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.18 -- Package version: 18.20.0b1 +- Package version: 18.20.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/kubernetes/__init__.py b/kubernetes/__init__.py index 2b367f888..66af35f59 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__ = "18.20.0b1" +__version__ = "18.20.0" import kubernetes.client import kubernetes.config diff --git a/kubernetes/client/__init__.py b/kubernetes/client/__init__.py index b47a5b3da..5f8d5cbd8 100644 --- a/kubernetes/client/__init__.py +++ b/kubernetes/client/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "18.20.0b1" +__version__ = "18.20.0" # 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 2e038a914..613763b59 100644 --- a/kubernetes/client/api/custom_objects_api.py +++ b/kubernetes/client/api/custom_objects_api.py @@ -2425,7 +2425,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 @@ -2594,7 +2594,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 @@ -2763,7 +2763,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 @@ -2941,7 +2941,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 @@ -3119,7 +3119,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 @@ -3297,7 +3297,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 edcdead5f..88dc7e038 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/18.20.0b1/python' + self.user_agent = 'OpenAPI-Generator/18.20.0/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 ed81b5164..c61c07044 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.18\n"\ - "SDK Package Version: 18.20.0b1".\ + "SDK Package Version: 18.20.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/kubernetes/client/models/v1_projected_volume_source.py b/kubernetes/client/models/v1_projected_volume_source.py index ab8c66a26..a2f41d730 100644 --- a/kubernetes/client/models/v1_projected_volume_source.py +++ b/kubernetes/client/models/v1_projected_volume_source.py @@ -99,6 +99,9 @@ class V1ProjectedVolumeSource(object): :param sources: The sources of this V1ProjectedVolumeSource. # noqa: E501 :type: list[V1VolumeProjection] """ + if self.local_vars_configuration.client_side_validation and sources is None: # noqa: E501 + raise ValueError("Invalid value for `sources`, must not be `None`") # noqa: E501 + self._sources = sources def to_dict(self): 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/kubernetes/test/test_configuration.py b/kubernetes/test/test_configuration.py deleted file mode 100644 index 15e065090..000000000 --- a/kubernetes/test/test_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -import unittest - -from kubernetes.client import Configuration - -class TestConfiguration(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - # reset Configuration - Configuration.set_default(None) - - def testConfiguration(self): - # check that different instances use different dictionaries - c1 = Configuration() - c2 = Configuration() - self.assertNotEqual(id(c1.api_key), id(c2.api_key)) - self.assertNotEqual(id(c1.api_key_prefix), id(c2.api_key_prefix)) - - def testDefaultConfiguration(self): - # prepare default configuration - c1 = Configuration(host="example.com") - c1.debug = True - Configuration.set_default(c1) - - # get default configuration - c2 = Configuration.get_default_copy() - self.assertEqual(c2.host, "example.com") - self.assertTrue(c2.debug) - - self.assertNotEqual(id(c1.api_key), id(c2.api_key)) - self.assertNotEqual(id(c1.api_key_prefix), id(c2.api_key_prefix)) - - -if __name__ == '__main__': - unittest.main() diff --git a/setup.py b/setup.py index 28014ceeb..3c165940f 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,9 @@ from setuptools import setup # Do not edit these constants. They will be updated automatically # by scripts/update-client.sh. -CLIENT_VERSION = "18.20.0b1" +CLIENT_VERSION = "18.20.0" PACKAGE_NAME = "kubernetes" -DEVELOPMENT_STATUS = "4 - Beta" +DEVELOPMENT_STATUS = "5 - Production/Stable" # To install the library, run the following #