Regenerate the synchronous client with the modern Python generator#2631
Draft
tamird wants to merge 4 commits into
Draft
Regenerate the synchronous client with the modern Python generator#2631tamird wants to merge 4 commits into
tamird wants to merge 4 commits into
Conversation
OpenAPI Generator v7 removed python-legacy. Regenerate with the modern python generator from client-gen commit 7529a2f1 plus the temporary compatibility patch for OpenAPITools/openapi-generator#24290. This commit intentionally contains only generated output and the preprocessed Swagger spec. Handwritten adapters follow separately.
The modern Python generator imports Pydantic and typing-extensions, and its requirements template now requires python-dateutil 2.8.2 and urllib3 2.6.3 through 2.x. Package the generated py.typed marker with both normal and release builds.
The modern Python generator replaces request() with param_serialize()/call_api(), exposes raw responses through *_without_preload_content siblings, annotates return types, and changes deserialize(). Update the dynamic client, OIDC refresh, stream, watch, YAML helper, and examples to use those contracts. DynamicClient keeps accepting async_req because the old implementation immediately resolved its future with .get(). The synchronous YAML helper rejects async_req=True instead of passing an unsupported argument into generated methods. Add focused HTTP and stream regressions for these compatibility paths.
The modern generation path owns the behaviors that release.sh previously reconstructed by cherry-picking old commits and applying transport patches. Remove that second mutation phase and its patch scripts so update-client.sh leaves the canonical generated tree intact. Ignore new generator support files that this package does not ship, and remove the obsolete hot-issues release instructions.
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tamird The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
technically ton of (urllib compatibility, typing, several broken places with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / why we need it:
The synchronous client is still generated with OpenAPI Generator 6.6's
python-legacybackend. OpenAPI Generator removed that backend in v7,so the current generation path cannot move to a supported generator or
inherit the modern Python generator's native type information.
This draft shows the complete downstream result of moving the
synchronous client to the modern
pythonbackend:methods;
py.typed;modern generated API; and
obsolete.
Which issue(s) this PR fixes:
None.
Special notes for your reviewer:
This is an inspection draft, not a merge-ready change.
The generated output uses kubernetes-client/gen commit b904a3c7, pinned
to OpenAPI Generator commit c797da89 plus the temporary
python-legacy-compat.patch. That patch carriesOpenAPITools/openapi-generator#24290's
compatibleWithPythonLegacyoption so the modern generator preservesthe synchronous client's existing public model and configuration
behavior.
Before marking this ready, OpenAPITools/openapi-generator#24290 must
merge and be available as an upstream commit or release. Then
client-gen should pin that upstream source, delete the temporary patch
plumbing, and regenerate this branch canonically.
Focused config, dynamic, stream, watch, generated-API, and proxy
coverage passes 143 tests plus 9 subtests. The cumulative diff also
passes
git diff --check.Does this PR introduce a user-facing change?
Additional documentation: