From 1e56662ba79c97feb3342efdb91e57aa59cf20fc Mon Sep 17 00:00:00 2001 From: yliao Date: Thu, 8 Oct 2026 10:45:12 -0700 Subject: [PATCH 1/2] moved the breaking changes section to under v37.0.0 --- CHANGELOG.md | 105 +++++++++++++++++++++++++-------------------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 849e7df647..774b50b76d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,58 @@ Kubernetes API Version: v1.37.1 +# Breaking Change from upgrading OpenAPI Generator to v7.24.0 + +Both clients now use the modern Python generator instead of +`python-legacy`. The asynchronous client uses the generator's `asyncio` +library and `aiohttp` transport. Existing endpoint names, model names, +and wire aliases are preserved, but applications may need the following +updates: + +- Synchronous runtime dependencies now require `urllib3>=2.6.3,<3`, + `pydantic>=2.11`, `lazy-imports>=1,<2`, + `typing-extensions>=4.7.1`, and `python-dateutil>=2.8.2`. +- Asynchronous runtime dependencies now require + `aiohttp>=3.13.5,<4.0.0`, `aiohttp-retry>=2.8.3`, `pydantic>=2.11`, + `lazy-imports>=1,<2`, `typing-extensions>=4.7.1`, and + `python-dateutil>=2.8.2`. `certifi` and `six` are no longer direct + asynchronous dependencies. Python 3.10 remains the minimum supported + version for both clients. +- Models and API-call arguments now use Pydantic validation. Invalid, + unknown, or previously coerced values can raise + `pydantic.ValidationError` before a request is sent; models are + keyword-only, reject unknown fields during construction, and validate + assignments. The model `local_vars_configuration` argument and + Configuration's `discard_unknown_keys` and + `disabled_client_side_validations` arguments are removed. + `client_side_validation=False` no longer disables generated + validation. +- Low-level synchronous transport interfaces changed. Direct callers of + `ApiClient.request`, `ApiClient.call_api`, `ApiClient.deserialize`, or + the `RESTClientObject` HTTP-verb helpers must migrate to the modern + request/response interface. `ApiException.body` is now decoded text + instead of bytes. +- Low-level asynchronous transport interfaces also changed. Direct + callers of `ApiClient.call_api`, `ApiClient.param_serialize`, + `ApiClient.response_deserialize`, or `RESTClientObject.request` must + migrate to the modern `aiohttp` request/response interface. HTTP + sessions are created lazily; close an owned client with + `await client.close()` or an async context manager. Interactive + websocket streams use the generated `_without_preload_content` + operations. +- Individual resource-deletion methods that previously returned + `V1Status`, including `CoreV1Api.delete_namespace` and + `BatchV1Api.delete_namespaced_job`, now return decoded dictionaries in + both clients. A successful deletion can return either the deleted + resource or a Status; access response fields with dictionary keys + instead of model attributes. + +See [kubernetes-client/python#2631][python-pr] and +[kubernetes-client/gen#305][gen-pr]. + +[python-pr]: https://github.com/kubernetes-client/python/pull/2631 +[gen-pr]: https://github.com/kubernetes-client/gen/pull/305 + # v37.0.0b1 @@ -185,59 +237,6 @@ Kubernetes API Version: v1.37.0 - Removed the unused `PodStatusResult` type from the Kubernetes API. This type had no REST endpoint and has been unused since 2015. ([kubernetes/kubernetes#136271](https://github.com/kubernetes/kubernetes/pull/136271), [@adityasharmawork](https://github.com/adityasharmawork)) [SIG API Machinery, Apps, Node and Testing] - The change is for developers building against cri-api. Enum keys of Signal are now prefixed with `SIGNAL_` in api.proto definition to avoid conflicts with C++ macroses. The wire format is unchanged. ([kubernetes/kubernetes#139251](https://github.com/kubernetes/kubernetes/pull/139251), [@SergeyKanzhelev](https://github.com/SergeyKanzhelev)) [SIG Apps, Node and Testing] - -# Breaking Change from upgrading OpenAPI Generator to v7.24.0 - -Both clients now use the modern Python generator instead of -`python-legacy`. The asynchronous client uses the generator's `asyncio` -library and `aiohttp` transport. Existing endpoint names, model names, -and wire aliases are preserved, but applications may need the following -updates: - -- Synchronous runtime dependencies now require `urllib3>=2.6.3,<3`, - `pydantic>=2.11`, `lazy-imports>=1,<2`, - `typing-extensions>=4.7.1`, and `python-dateutil>=2.8.2`. -- Asynchronous runtime dependencies now require - `aiohttp>=3.13.5,<4.0.0`, `aiohttp-retry>=2.8.3`, `pydantic>=2.11`, - `lazy-imports>=1,<2`, `typing-extensions>=4.7.1`, and - `python-dateutil>=2.8.2`. `certifi` and `six` are no longer direct - asynchronous dependencies. Python 3.10 remains the minimum supported - version for both clients. -- Models and API-call arguments now use Pydantic validation. Invalid, - unknown, or previously coerced values can raise - `pydantic.ValidationError` before a request is sent; models are - keyword-only, reject unknown fields during construction, and validate - assignments. The model `local_vars_configuration` argument and - Configuration's `discard_unknown_keys` and - `disabled_client_side_validations` arguments are removed. - `client_side_validation=False` no longer disables generated - validation. -- Low-level synchronous transport interfaces changed. Direct callers of - `ApiClient.request`, `ApiClient.call_api`, `ApiClient.deserialize`, or - the `RESTClientObject` HTTP-verb helpers must migrate to the modern - request/response interface. `ApiException.body` is now decoded text - instead of bytes. -- Low-level asynchronous transport interfaces also changed. Direct - callers of `ApiClient.call_api`, `ApiClient.param_serialize`, - `ApiClient.response_deserialize`, or `RESTClientObject.request` must - migrate to the modern `aiohttp` request/response interface. HTTP - sessions are created lazily; close an owned client with - `await client.close()` or an async context manager. Interactive - websocket streams use the generated `_without_preload_content` - operations. -- Individual resource-deletion methods that previously returned - `V1Status`, including `CoreV1Api.delete_namespace` and - `BatchV1Api.delete_namespaced_job`, now return decoded dictionaries in - both clients. A successful deletion can return either the deleted - resource or a Status; access response fields with dictionary keys - instead of model attributes. - -See [kubernetes-client/python#2631][python-pr] and -[kubernetes-client/gen#305][gen-pr]. - -[python-pr]: https://github.com/kubernetes-client/python/pull/2631 -[gen-pr]: https://github.com/kubernetes-client/gen/pull/305 - # v36.0.3 Kubernetes API Version: v1.36.2 From aac201479cd3569d7bb2a148da3ca829dac9bc19 Mon Sep 17 00:00:00 2001 From: yliao Date: Fri, 9 Oct 2026 07:00:35 -0700 Subject: [PATCH 2/2] updated README and CHANGELOG --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 774b50b76d..266e93a511 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v37.0.1 + +Kubernetes API Version: v1.37.1 + +- Fixed type checkers such as pyright reporting documented functions and classes in `kubernetes.config`, `kubernetes.stream`, `kubernetes.utils`, `kubernetes.watch` and their `kubernetes.aio` counterparts, for example `config.load_kube_config` and `utils.create_from_yaml`, as not exported since v37.0.0. Wildcard imports such as `from kubernetes.config import *` no longer import unrelated names like `exists` and `expanduser`. + +- Fixed importing API submodules such as `core_v1_api` from the deprecated `kubernetes.client.apis` package, which raised `ImportError` since v37.0.0. + # v37.0.0 Kubernetes API Version: v1.37.1 diff --git a/README.md b/README.md index b033ce58ea..26106dfad4 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ supported versions of Kubernetes clusters. - [client 34.y.z](https://pypi.org/project/kubernetes/34.1.0/): Kubernetes 1.33 or below (+-), Kubernetes 1.34 (✓), Kubernetes 1.35 or above (+-) - [client 35.y.z](https://pypi.org/project/kubernetes/35.0.0/): Kubernetes 1.34 or below (+-), Kubernetes 1.35 (✓), Kubernetes 1.36 or above (+-) - [client 36.y.z](https://pypi.org/project/kubernetes/36.0.3/): Kubernetes 1.35 or below (+-), Kubernetes 1.36 (✓), Kubernetes 1.37 or above (+-) -- [client 37.y.z](https://pypi.org/project/kubernetes/37.0.0/): Kubernetes 1.36 or below (+-), Kubernetes 1.37 (✓), Kubernetes 1.38 or above (+-) +- [client 37.y.z](https://pypi.org/project/kubernetes/37.0.1/): Kubernetes 1.36 or below (+-), Kubernetes 1.37 (✓), Kubernetes 1.38 or above (+-) > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.