remove eol of python-flask-connexion3
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.txtandsetup.pyconfigurations. - 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.0with Flask 2.x, while Connexion 3 keepsconnexion[flask,swagger-ui,uvicorn]>=3.3.0,<4.0.0with 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.0and regenerates the Python Flask petstore samples.
Closes #25375.