Skip to content

Commit 02124c4

Browse files
Merge branch 'master' into dependabot/pip/urllib3-neq-2.6.0-and-gte-2.7.0
2 parents cd9058e + c92104e commit 02124c4

7,111 files changed

Lines changed: 2040008 additions & 598454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-wiki.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
deploy-wiki:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
14+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
1515
with:
1616
submodules: true
1717
- name: Install rsync

.github/workflows/e2e-master.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: ["3.10", "3.11", "3.12"]
1717
steps:
18-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
18+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster
@@ -30,7 +30,7 @@ jobs:
3030
# as we sync with Kubernetes upstream
3131
config: .github/workflows/kind-configs/cluster-1.35.yaml
3232
- name: Set up Python ${{ matrix.python-version }}
33-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
33+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636
- name: Install dependencies

.github/workflows/e2e-release-35.0.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [3.10, 3.11, 3.12]
1717
steps:
18-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
18+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
1919
with:
2020
submodules: true
2121
- name: Create Kind Cluster
@@ -30,7 +30,7 @@ jobs:
3030
# as we sync with Kubernetes upstream
3131
config: .github/workflows/kind-configs/cluster-1.35.yaml
3232
- name: Set up Python ${{ matrix.python-version }}
33-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
33+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636
- name: Install dependencies

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
use_coverage: 'coverage'
1414

1515
steps:
16-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
16+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
1717
with:
1818
submodules: true
1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
20+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Install dependencies
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Upload coverage to Codecov
4747
if: "matrix.use_coverage"
48-
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354
48+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f
4949
with:
5050
fail_ci_if_error: false
5151
verbose: true

.readthedocs.yaml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@ build:
1313
# nodejs: "20"
1414
# rust: "1.70"
1515
# golang: "1.20"
16+
jobs:
17+
# Empty build step to override and stop standard Sphinx/MkDocs execution
18+
build:
19+
html:
20+
- mkdir -p $READTHEDOCS_OUTPUT/html
21+
- cp -r doc/html/* $READTHEDOCS_OUTPUT/html/
22+
23+
# Copy your raw HTML directly to the hosted output folder
24+
# post_build:
1625

1726
# Build documentation in the "docs/" directory with Sphinx
18-
sphinx:
19-
configuration: doc/source/conf.py
27+
# sphinx:
28+
# configuration: doc/source/conf.py
2029
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
2130
# builder: "dirhtml"
2231
# Fail on all warnings to avoid broken references
@@ -30,12 +39,13 @@ sphinx:
3039
# Optional but recommended, declare the Python requirements required
3140
# to build your documentation
3241
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33-
python:
34-
install:
35-
- requirements: doc/requirements-docs.txt
36-
- requirements: test-requirements.txt
37-
38-
42+
#python:
43+
# install:
44+
# - requirements: doc/requirements-docs.txt
45+
# - requirements: test-requirements.txt
46+
# - requirements: requirements.txt
47+
#
48+
#
3949
# git clone --depth 1 https://github.com/kubernetes-client/python .
4050
# git fetch origin --force --prune --prune-tags --depth 50 refs/heads/master:refs/remotes/origin/master
4151
# git checkout --force origin/master
@@ -50,4 +60,4 @@ python:
5060
# python -m sphinx -T -E -b latex -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/pdf
5161
# cat latexmkrc
5262
# latexmk -r latexmkrc -pdf -f -dvi- -ps- -jobname=kubernetes -interaction=nonstopmode
53-
# python -m sphinx -T -E -b epub -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/epub
63+
# python -m sphinx -T -E -b epub -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/epub

CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,82 @@
1+
# Breaking Change from upgrading OpenAPI Generator to v7.24.0
2+
3+
Both clients now use the modern Python generator instead of
4+
`python-legacy`. The asynchronous client uses the generator's `asyncio`
5+
library and `aiohttp` transport. Existing endpoint names, model names,
6+
and wire aliases are preserved, but applications may need the following
7+
updates:
8+
9+
- Synchronous runtime dependencies now require `urllib3>=2.6.3,<3`,
10+
`pydantic>=2.11`, `lazy-imports>=1,<2`,
11+
`typing-extensions>=4.7.1`, and `python-dateutil>=2.8.2`.
12+
- Asynchronous runtime dependencies now require
13+
`aiohttp>=3.13.5,<4.0.0`, `aiohttp-retry>=2.8.3`, `pydantic>=2.11`,
14+
`lazy-imports>=1,<2`, `typing-extensions>=4.7.1`, and
15+
`python-dateutil>=2.8.2`. `certifi` and `six` are no longer direct
16+
asynchronous dependencies. Python 3.10 remains the minimum supported
17+
version for both clients.
18+
- Models and API-call arguments now use Pydantic validation. Invalid,
19+
unknown, or previously coerced values can raise
20+
`pydantic.ValidationError` before a request is sent; models are
21+
keyword-only, reject unknown fields during construction, and validate
22+
assignments. The model `local_vars_configuration` argument and
23+
Configuration's `discard_unknown_keys` and
24+
`disabled_client_side_validations` arguments are removed.
25+
`client_side_validation=False` no longer disables generated
26+
validation.
27+
- Low-level synchronous transport interfaces changed. Direct callers of
28+
`ApiClient.request`, `ApiClient.call_api`, `ApiClient.deserialize`, or
29+
the `RESTClientObject` HTTP-verb helpers must migrate to the modern
30+
request/response interface. `ApiException.body` is now decoded text
31+
instead of bytes.
32+
- Low-level asynchronous transport interfaces also changed. Direct
33+
callers of `ApiClient.call_api`, `ApiClient.param_serialize`,
34+
`ApiClient.response_deserialize`, or `RESTClientObject.request` must
35+
migrate to the modern `aiohttp` request/response interface. HTTP
36+
sessions are created lazily; close an owned client with
37+
`await client.close()` or an async context manager. Interactive
38+
websocket streams use the generated `_without_preload_content`
39+
operations.
40+
- `CoreV1Api.delete_namespace` now returns a decoded dictionary rather
41+
than `V1Status`, since a successful deletion can return either a
42+
terminating Namespace or a Status.
43+
44+
See [kubernetes-client/python#2631][python-pr] and
45+
[kubernetes-client/gen#305][gen-pr].
46+
47+
[python-pr]: https://github.com/kubernetes-client/python/pull/2631
48+
[gen-pr]: https://github.com/kubernetes-client/gen/pull/305
49+
50+
# v36.0.3
51+
52+
Kubernetes API Version: v1.36.2
53+
54+
### Bug or Regression
55+
- Fix Watch.stream selecting watch instead of follow when streaming pod logs.
56+
- Start the leader election worker thread as a daemon so it does not block process shutdown.
57+
- Fix readline_channel, readline_stdout and readline_stderr crashing with OverflowError when using the default timeout, and returning None when a timeout expires.
58+
- Fix format_quantity returning imprecise, non-canonical values for the milli, micro and nano suffixes, and ignoring quantize=Decimal(0).
59+
60+
# v36.0.2
61+
62+
Kubernetes API Version: v1.36.1
63+
64+
### Uncategorized
65+
- Restored backward compatibility for `Configuration.auth_settings()`:
66+
the legacy `api_key['authorization']` lookup is honored as a fallback
67+
when `api_key['BearerToken']` is not set, fixing 401 Unauthorized
68+
regressions seen after upgrading to v36.0.0 (#2595). (#2604, @GK-07)
69+
70+
# v36.0.1
71+
72+
Kubernetes API Version: v1.36.1
73+
74+
### Bug or Regression
75+
- Fix `load_incluster_config()` and `load_kube_config()` (sync and async, with a static token) so requests carry an `Authorization` header on `kubernetes-client/python` v36+. Without this fix, in-cluster pods upgrading to v36 silently send unauthenticated requests and the apiserver rejects them as `system:anonymous`. (#2585, @Jmacek)
76+
77+
### Deprecation
78+
- Support new exec v5 websocket subprotocol (#2486, @aojea)
79+
180
# v36.0.0
281

382
Kubernetes API Version: v1.36.1
@@ -250,6 +329,9 @@ Kubernetes API Version: v1.36.0
250329

251330
- Configuration auth uses 'BearerToken' instead of 'authorization' in api_key.
252331

332+
- V1ServiceSpec's external_i_ps has been renamed to external_ips, and
333+
cluster_i_ps to cluster_ips.
334+
253335
# v35.0.0
254336

255337
Kubernetes API Version: v1.35.0

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ include OWNERS
33
include *.md
44
include *.txt
55
include *.ini
6+
include kubernetes/client/py.typed
67
exclude .gitignore
78
exclude .gitreview
89

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ supported versions of Kubernetes clusters.
134134
- [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 (+-)
135135
- [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 (+-)
136136
- [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 (+-)
137-
- [client 36.y.z](https://pypi.org/project/kubernetes/36.0.0/): Kubernetes 1.35 or below (+-), Kubernetes 1.36 (✓), Kubernetes 1.37 or above (+-)
137+
- [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 (+-)
138138

139139

140140
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.

devel/release.md

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -104,62 +104,29 @@ command:
104104
scripts/update-client.sh
105105
```
106106

107-
**NOTE**: If you see a lot of new or modified files under the `kubernetes/test/`
108-
directory, delete everything except `kubernetes/test/test_api_client.py` and
109-
`kubernetes/test/test_configuration.py`.
110-
111107
Commit changes (should be only version number changes) to the release branch.
112108
Name the commit something like "Update version constants for XXX release".
113109

114-
***After you finished the steps above, refer to the section, "Hot issues", and
115-
apply the manual fixes.***
116-
117110
```bash
118111
git push upstream $RELEASE_BRANCH
119112
```
120113

121-
### 3. Hot issues
122-
123-
Use the `scripts/apply-hotfixes.sh` script to apply the fixes below in one step.
124-
**As mentioned above, the script should be run after finishing the section "Update release tags". Also, ensure a clean working directory before applying the script.**
125-
126-
Commit the manual changes like this [PR](https://github.com/kubernetes-client/python/pull/995/commits) does.
127-
128-
There are some hot issues with the client generation that require manual fixes.
129-
**The steps below are deprecated and only exist for documentation purposess. They should be performed using the `scripts/apply-hotfixes.sh` script mentioned above.**
130-
131-
1. Restore custom object patch behavior. You should apply [this commit](https://github.com/kubernetes-client/python/pull/995/commits/9959273625b999ae9a8f0679c4def2ee7d699ede)
132-
to ensure custom object patch behavior is backwards compatible. For more
133-
details, see [#866](https://github.com/kubernetes-client/python/issues/866) and
134-
[#959](https://github.com/kubernetes-client/python/pull/959).
135-
136-
2. Add alias package kubernetes.client.apis with deprecation warning. You need
137-
to add [this file](https://github.com/kubernetes-client/python/blob/0976d59d6ff206f2f428cabc7a6b7b1144843b2a/kubernetes/client/apis/__init__.py)
138-
under `kubernetes/client/apis/` to ensure the package is backwards compatible.
139-
For more details, see [#974](https://github.com/kubernetes-client/python/issues/974)
140-
141-
3. Add ability to the client to be used as Context Manager [kubernetes-client/python#1073](https://github.com/kubernetes-client/python/pull/1073)
142-
143-
4. Remove the tests directory (ref: https://github.com/kubernetes-client/python/commit/ec9c944f076999543cd2122aff2d86f969d82548). See the [upstream issue](https://github.com/OpenAPITools/openapi-generator/issues/5377) for more information.
144-
145-
5. Add tests for the default `Configuration` behavior (ref: https://github.com/kubernetes-client/python/pull/1303 and https://github.com/kubernetes-client/python/pull/1285). The commit [1ffa61d0650e4c93e0d7f0becd2c54797eafd407](https://github.com/kubernetes-client/python/pull/1285/commits/1ffa61d0650e4c93e0d7f0becd2c54797eafd407) should be cherry-picked.
146-
147-
### 4. CHANGELOG
114+
### 3. CHANGELOG
148115

149116
Make sure the change logs are up to date [here](https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md).
150117
If they are not, follow commits added after the last release and update/commit
151118
the change logs to master.
152119

153120
Then based on the release, follow one of next two steps.
154121

155-
### 5. README
122+
### 4. README
156123

157124
Update the compatibility matrix and maintenance status in the README file.
158125

159126
### Submit pull request
160127

161-
Typically after the you've completed steps 2-6 above you can push your changes
162-
open a pull request against `kubernetes-client:release-x.y`
128+
After completing the steps above, push your changes and open a pull request
129+
against `kubernetes-client:release-x.y`.
163130

164131
## Patch a release branch
165132

doc/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ help:
1515

1616
.PHONY: help Makefile
1717

18+
# additional step to use sphinx-apidoc to generate rst files for APIs
19+
rst:
20+
rm -f $(SOURCEDIR)/kubernetes.*.rst
21+
$(SPHINXAPIDOC) -o "$(SOURCEDIR)" ../kubernetes/ -e -f
22+
1823
# Catch-all target: route all unknown targets to Sphinx using the new
1924
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
20-
html:
21-
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25+
html: rst
26+
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -j 200 $(O)
2227
@echo "\nDocs rendered successfully, open _/build/html/index.html to view"

0 commit comments

Comments
 (0)