diff --git a/CHANGELOG.md b/CHANGELOG.md index 167e510cfe..0c051c2b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v35.0.0 + +Kubernetes API Version: v1.35.0 + + # v35.0.0b1 Kubernetes API Version: v1.35.0 diff --git a/README.md b/README.md index f5877c1d82..db330e02b9 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ supported versions of Kubernetes clusters. - [client 32.y.z](https://pypi.org/project/kubernetes/32.0.1/): Kubernetes 1.31 or below (+-), Kubernetes 1.32 (✓), Kubernetes 1.33 or above (+-) - [client 33.y.z](https://pypi.org/project/kubernetes/33.1.0/): Kubernetes 1.32 or below (+-), Kubernetes 1.33 (✓), Kubernetes 1.34 or above (+-) - [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.0b1/): Kubernetes 1.34 or below (+-), Kubernetes 1.35 (✓), Kubernetes 1.36 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 (+-) > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release. @@ -173,12 +173,13 @@ between client-python versions. | 31.0 Alpha/Beta | Kubernetes main repo, 1.31 branch | ✗ | | 31.0 | Kubernetes main repo, 1.31 branch | ✗ | | 32.0 Alpha/Beta | Kubernetes main repo, 1.32 branch | ✗ | -| 32.1 | Kubernetes main repo, 1.32 branch | ✓ | +| 32.1 | Kubernetes main repo, 1.32 branch | ✗ | | 33.1 Alpha/Beta | Kubernetes main repo, 1.33 branch | ✗ | | 33.1 | Kubernetes main repo, 1.33 branch | ✓ | | 34.1 Alpha/Beta | Kubernetes main repo, 1.34 branch | ✗ | | 34.1 | Kubernetes main repo, 1.34 branch | ✓ | -| 35.0 Alpha/Beta | Kubernetes main repo, 1.35 branch | ✓ | +| 35.0 Alpha/Beta | Kubernetes main repo, 1.35 branch | ✗ | +| 35.0 | Kubernetes main repo, 1.35 branch | ✓ | > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release. diff --git a/examples/README.md b/examples/README.md index 618e840ea3..d84c633ae2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -15,3 +15,15 @@ installed following the directions If you find a problem please file an [issue](https://github.com/kubernetes-client/python/issues). + + +--- + +## Running Examples Locally + +### Prerequisites + +- Python 3.8 or newer +- Kubernetes Python client installed: + ```bash + pip install kubernetes diff --git a/examples/apply_from_dict.py b/examples/apply_from_dict.py index 9c0ac81242..972d42529d 100644 --- a/examples/apply_from_dict.py +++ b/examples/apply_from_dict.py @@ -1,3 +1,7 @@ +import sys +from kubernetes.client.rest import ApiException + + from kubernetes import client, config, utils def main(): config.load_kube_config() @@ -6,5 +10,12 @@ def main(): example_dict = {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'k8s-py-client-nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx:1.14.2', 'ports': [{'containerPort': 80}]}]}}}} utils.create_from_dict(k8s_client, example_dict) -if __name__ == '__main__': - main() \ No newline at end of file +if __name__ == "__main__": + try: + main() + except ApiException as e: + print(f"Kubernetes API error: {e}", file=sys.stderr) + sys.exit(1) + except Exception as e: + print(f"Unexpected error: {e}", file=sys.stderr) + sys.exit(2) diff --git a/kubernetes/README.md b/kubernetes/README.md index 32d08d068c..6ba37feb9f 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.35 -- Package version: 35.0.0b1 +- Package version: 35.0.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/kubernetes/__init__.py b/kubernetes/__init__.py index b7a5367190..664c5d2f7d 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__ = "35.0.0b1" +__version__ = "35.0.0" from . import client from . import config diff --git a/kubernetes/client/__init__.py b/kubernetes/client/__init__.py index d82585e673..03326a2f3a 100644 --- a/kubernetes/client/__init__.py +++ b/kubernetes/client/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "35.0.0b1" +__version__ = "35.0.0" # import apis into sdk package from kubernetes.client.api.well_known_api import WellKnownApi diff --git a/kubernetes/client/api_client.py b/kubernetes/client/api_client.py index 131f8e86d6..cadaa2c93e 100644 --- a/kubernetes/client/api_client.py +++ b/kubernetes/client/api_client.py @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/35.0.0b1/python' + self.user_agent = 'OpenAPI-Generator/35.0.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/kubernetes/client/configuration.py b/kubernetes/client/configuration.py index d9b57f3334..5548583cc3 100644 --- a/kubernetes/client/configuration.py +++ b/kubernetes/client/configuration.py @@ -364,7 +364,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: release-1.35\n"\ - "SDK Package Version: 35.0.0b1".\ + "SDK Package Version: 35.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/scripts/constants.py b/scripts/constants.py index 984221d94b..3a62fa0208 100644 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -18,13 +18,13 @@ KUBERNETES_BRANCH = "release-1.35" # client version for packaging and releasing. -CLIENT_VERSION = "35.0.0b1" +CLIENT_VERSION = "35.0.0" # Name of the release package PACKAGE_NAME = "kubernetes" # Stage of development, mainly used in setup.py's classifiers. -DEVELOPMENT_STATUS = "4 - Beta" +DEVELOPMENT_STATUS = "5 - Production/Stable" # If called directly, return the constant value given diff --git a/setup.py b/setup.py index c2c33e5660..9032278982 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,9 @@ # Do not edit these constants. They will be updated automatically # by scripts/update-client.sh. -CLIENT_VERSION = "35.0.0b1" +CLIENT_VERSION = "35.0.0" PACKAGE_NAME = "kubernetes" -DEVELOPMENT_STATUS = "4 - Beta" +DEVELOPMENT_STATUS = "5 - Production/Stable" # To install the library, run the following #