Repository navigation
[Python] Remove nose support from server generators - #25402
Open
Bernardoow wants to merge 2 commits into
Open
Bernardoow wants to merge 2 commits into
Bernardoow wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 47 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/migration-guide.adoc">
<violation number="1" location="docs/migration-guide.adoc:14">
P3: This heading names no release, unlike every other section in the guide. Add the target version (for example, 'From 7.x.y to 7.z.0') so readers can tell which release removes `useNose`.</violation>
</file>
<file name="modules/openapi-generator/src/main/resources/python-flask/travis.mustache">
<violation number="1" location="modules/openapi-generator/src/main/resources/python-flask/travis.mustache:20">
P1: This install line makes the Python 3.2–3.6 Flask Travis jobs install `pytest~=7.1.0`, which requires Python 3.7+. Those jobs now fail while resolving test dependencies; use Python-version-specific pytest constraints or remove the incompatible jobs.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| {{/useConnexion3}} | ||
| # command to install dependencies | ||
| install: "pip install -r requirements.txt" | ||
| install: "pip install -r requirements.txt -r test-requirements.txt" |
Contributor
There was a problem hiding this comment.
P1: This install line makes the Python 3.2–3.6 Flask Travis jobs install pytest~=7.1.0, which requires Python 3.7+. Those jobs now fail while resolving test dependencies; use Python-version-specific pytest constraints or remove the incompatible jobs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At modules/openapi-generator/src/main/resources/python-flask/travis.mustache, line 20:
<comment>This install line makes the Python 3.2–3.6 Flask Travis jobs install `pytest~=7.1.0`, which requires Python 3.7+. Those jobs now fail while resolving test dependencies; use Python-version-specific pytest constraints or remove the incompatible jobs.</comment>
<file context>
@@ -17,6 +17,6 @@ python:
{{/useConnexion3}}
# command to install dependencies
-install: "pip install -r requirements.txt"
+install: "pip install -r requirements.txt -r test-requirements.txt"
# command to run tests
-script: nosetests
</file context>
| * link:https://github.com/OpenAPITools/openapi-generator/labels/Breaking%20change%20%28with%20fallback%29[Breaking change (with fallback)] | ||
| * link:https://github.com/OpenAPITools/openapi-generator/labels/Breaking%20change%20%28without%20fallback%29[Breaking change (without fallback)] | ||
|
|
||
| === Removal of nose test-runner support |
Contributor
There was a problem hiding this comment.
P3: This heading names no release, unlike every other section in the guide. Add the target version (for example, 'From 7.x.y to 7.z.0') so readers can tell which release removes useNose.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/migration-guide.adoc, line 14:
<comment>This heading names no release, unlike every other section in the guide. Add the target version (for example, 'From 7.x.y to 7.z.0') so readers can tell which release removes `useNose`.</comment>
<file context>
@@ -11,6 +11,18 @@ Another approach to find breaking changes is to look at issue and pull requests
* link:https://github.com/OpenAPITools/openapi-generator/labels/Breaking%20change%20%28with%20fallback%29[Breaking change (with fallback)]
* link:https://github.com/OpenAPITools/openapi-generator/labels/Breaking%20change%20%28without%20fallback%29[Breaking change (without fallback)]
+=== Removal of nose test-runner support
+
+The `python-flask`, `python-aiohttp`, and `python-blueplanet` generators now always generate their existing pytest requirements and tox commands. The `useNose` option has been removed without a deprecation period or fallback. Existing pytest/plugin version constraints, Python settings, and generated test styles are preserved; this change does not standardize or upgrade the testing dependencies.
</file context>
Contributor
Author
|
Needs wait this PR #25376 |
This branch has not been deployed
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.
This MR removes nose support from the Flask, aiohttp, and BluePlanet server generators. It removes the useNose option and Java API, makes the generators use their existing pytest configuration, and updates related requirements, tox and Travis configurations, documentation, samples, and ignore files. It also fixes Flask Travis to install test requirements and run pytest.
The change preserves existing dependency versions and Python support settings. Users who set useNose should remove that property. Custom templates or generated projects with nose configuration may need manual updates.
Validation: the focused Java tests passed (35 tests). The full Maven suite passed except for a remote fixture test blocked by sandbox network access; it passed on a network-enabled rerun. Python sample results matched their baselines, including the same existing failures. BluePlanet’s runtime could not be validated because Python 3.5 and a pinned dependency were unavailable.
PR checklist
(For Windows users, please run the script in WSL)
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.