Skip to content

remove eol of python-flask-connexion3 - #25376

Open
Bernardoow wants to merge 6 commits into
OpenAPITools:masterfrom
Bernardoow:updating-python-flask
Open

Bernardoow wants to merge 6 commits into
OpenAPITools:masterfrom
Bernardoow:updating-python-flask

Conversation

@Bernardoow

@Bernardoow Bernardoow commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR updates the Python Flask server generator to support Python 3.11–3.14 for both Connexion 2 and Connexion 3.

Changes include:

  • Update supported Python versions to 3.11–3.15.
  • Update Connexion 2 dependency constraints to >=2.3.3,<3.0.0.
  • Maintain Connexion 3 dependency constraints at >=2.3.3,<4.0.0.
  • Update Flask and related dependency constraints.
  • Align requirements.txt and setup.py configurations.
  • Remove obsolete Python version compatibility code.
  • Preserve existing legacy testing options, including Nose and Flask-Testing.

Closes #25375

PR checklist

  • Read the contribution guidelines.

  • Run the following to build the project and update samples:

    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    

    (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.

  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.


Summary by cubic

Removes support for end-of-life Python versions in the Python Flask server generator, now supporting Python 3.11–3.15.

Migration

  • Generated servers now require Python >=3.11,<3.15; Python 3.10 and below are no longer supported.
  • Connexion 2 output pins connexion[swagger-ui]>=2.15.1,<3.0.0 with Flask 2.x, while Connexion 3 keeps connexion[flask,swagger-ui,uvicorn]>=3.3.0,<4.0.0 with Flask <4.0.0.
  • Drops CI coverage for Python 3.2–3.10 and removes pre-3.7 typing compatibility branches in typing_utils.py.
  • Relaxes the pytest constraint to >=7.1.0,<10.0.0 and regenerates the Python Flask petstore samples.

Closes #25375.

Written for commit 2813cbe. Summary will update on new commits.

View guided diff

@Bernardoow Bernardoow changed the title remove eol of python remove eol of python-flask-connexion3 Oct 23, 2026
@Bernardoow

Copy link
Copy Markdown
Contributor Author

If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10)

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 18 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="modules/openapi-generator/src/main/resources/python-flask/travis.mustache">

<violation number="1" location="modules/openapi-generator/src/main/resources/python-flask/travis.mustache:8">
P2: This matrix adds Python 3.15 even though generated `setup.py` explicitly rejects Python 3.15 (`python_requires=">=3.11,<3.15"`). Remove this entry or raise the package support constraint and dependency support together before testing 3.15.</violation>
</file>

<file name="samples/server/petstore/python-flask/.travis.yml">

<violation number="1" location="samples/server/petstore/python-flask/.travis.yml:8">
P2: This adds Python 3.15 to the CI matrix even though the sample declares `python_requires=">=3.11,<3.15"` and the stated support range ends at 3.14. Remove this entry, or update the package support constraints only after 3.15 is intentionally supported.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread modules/openapi-generator/src/main/resources/python-flask/setup.mustache Outdated
Comment thread modules/openapi-generator/src/main/resources/python-flask/requirements.mustache Outdated
{{/useConnexion3}}
- "3.13"
- "3.14"
- "3.15"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This matrix adds Python 3.15 even though generated setup.py explicitly rejects Python 3.15 (python_requires=">=3.11,<3.15"). Remove this entry or raise the package support constraint and dependency support together before testing 3.15.

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 8:

<comment>This matrix adds Python 3.15 even though generated `setup.py` explicitly rejects Python 3.15 (`python_requires=">=3.11,<3.15"`). Remove this entry or raise the package support constraint and dependency support together before testing 3.15.</comment>

<file context>
@@ -1,21 +1,12 @@
-{{/useConnexion3}}
+  - "3.13"
+  - "3.14"
+  - "3.15"
+
 # command to install dependencies
</file context>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The connexion3 was update to be compatible with 3.15 but not yet release.. I can wait for this !!

spec-first/connexion@3216244

Comment thread samples/server/petstore/python-flask-connexion3/README.md
Comment thread samples/server/petstore/python-flask-connexion3/requirements.txt Outdated
Comment thread samples/server/petstore/python-flask-connexion3/.travis.yml
Comment thread modules/openapi-generator/src/main/resources/python-flask/requirements.mustache Outdated
Comment thread modules/openapi-generator/src/main/resources/python-flask/setup.mustache Outdated
Comment thread samples/server/petstore/python-flask-connexion3/setup.py Outdated
@Bernardoow

Copy link
Copy Markdown
Contributor Author

Working on Cubit points - 2026-10-24

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

View guided diff | Re-trigger cubic

Execute the shared JSON serialization regression suite for both samples.
Trigger CI on template and regression test changes.
Preserve the existing Connexion 3 controller tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQ] [PYTHON] Update supported Python versions and dependencies for Connexion 2 and 3

1 participant