Repository navigation
REMOVE support to python3.10 - #25306
Conversation
|
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) |
There was a problem hiding this comment.
10 issues found across 81 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="samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py">
<violation number="1" location="samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py:24">
P2: This update does not enforce the Python 3.11 floor because `PYTHON_REQUIRES` is never passed to `setup()`. Add `python_requires=PYTHON_REQUIRES` to the `setup()` call so package metadata rejects Python 3.10.</violation>
</file>
<file name="modules/openapi-generator/src/main/resources/python/setup.mustache">
<violation number="1" location="modules/openapi-generator/src/main/resources/python/setup.mustache:13">
P2: Changing this constant does not enforce the new minimum because `setup()` never receives `python_requires=PYTHON_REQUIRES`. Pass the constant into `setup()` so generated distributions publish the Python 3.11 requirement and installers reject unsupported Python versions.</violation>
</file>
<file name="samples/openapi3/client/petstore/python-httpx/setup.py">
<violation number="1" location="samples/openapi3/client/petstore/python-httpx/setup.py:23">
P2: The new minimum is not enforced for the documented `python setup.py install` path because `PYTHON_REQUIRES` is unused. Pass `python_requires=PYTHON_REQUIRES` to `setup()` (or remove the legacy path and documentation) so Python 3.10 installations are rejected consistently.</violation>
</file>
<file name="samples/openapi3/client/petstore/python-aiohttp/setup.py">
<violation number="1" location="samples/openapi3/client/petstore/python-aiohttp/setup.py:23">
P2: `PYTHON_REQUIRES` is not passed to `setup()`, so this package still advertises no Python requirement and can be installed on Python 3.10 despite the intended support removal. Add `python_requires=PYTHON_REQUIRES` to the `setup()` call.</violation>
</file>
<file name="samples/openapi3/client/petstore/python-httpx-sync/setup.py">
<violation number="1" location="samples/openapi3/client/petstore/python-httpx-sync/setup.py:23">
P1: This change does not enforce the Python 3.11 minimum because `PYTHON_REQUIRES` is never passed to `setup()`. Add `python_requires=PYTHON_REQUIRES` to the setup metadata so package installers reject Python 3.10.</violation>
</file>
<file name="samples/client/others/python-legacy-model-dictionaries/setup.py">
<violation number="1" location="samples/client/others/python-legacy-model-dictionaries/setup.py:23">
P2: This version change does not affect the published package because `setup()` never passes `PYTHON_REQUIRES` as `python_requires`; add `python_requires=PYTHON_REQUIRES` so installers reject Python 3.10.</violation>
</file>
<file name="samples/openapi3/client/petstore/python-lazyImports/setup.py">
<violation number="1" location="samples/openapi3/client/petstore/python-lazyImports/setup.py:23">
P2: This change does not enforce the Python 3.11 minimum for direct `setup.py` installations because `PYTHON_REQUIRES` is never passed to `setup()`. Add `python_requires=PYTHON_REQUIRES` to the setup call, or remove this legacy installation path if `pyproject.toml` is the only supported packaging path.</violation>
</file>
<file name="samples/server/petstore/python-fastapi/setup.cfg">
<violation number="1" location="samples/server/petstore/python-fastapi/setup.cfg:7">
P1: `python_requires` uses an invalid PEP 440 specifier, so setuptools can reject this sample’s metadata during build or installation. Use `>= 3.11` instead.</violation>
</file>
<file name=".github/workflows/samples-python-pydantic-v1-client-echo-api.yaml">
<violation number="1" location=".github/workflows/samples-python-pydantic-v1-client-echo-api.yaml:24">
P2: Python 3.15 is still excluded from this workflow because the new matrix entry is commented out. Enable the entry so this pydantic-v1 echo sample actually validates the newly supported Python version.</violation>
</file>
<file name=".github/workflows/samples-python-pydantic-v1-petstore.yaml">
<violation number="1" location=".github/workflows/samples-python-pydantic-v1-petstore.yaml:22">
P2: This new Python 3.15 matrix entry runs the Pydantic v1 samples, but Pydantic v1 does not support Python 3.15, so these CI jobs will fail or exercise an unsupported environment. Remove this entry or migrate the samples before testing Python 3.15.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| NAME = "petstore-api" | ||
| VERSION = "1.0.0" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P1: This change does not enforce the Python 3.11 minimum because PYTHON_REQUIRES is never passed to setup(). Add python_requires=PYTHON_REQUIRES to the setup metadata so package installers reject Python 3.10.
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 samples/openapi3/client/petstore/python-httpx-sync/setup.py, line 23:
<comment>This change does not enforce the Python 3.11 minimum because `PYTHON_REQUIRES` is never passed to `setup()`. Add `python_requires=PYTHON_REQUIRES` to the setup metadata so package installers reject Python 3.10.</comment>
<file context>
@@ -20,7 +20,7 @@
NAME = "petstore-api"
VERSION = "1.0.0"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
"python-dateutil >= 2.8.2",
</file context>
| long_description = file: README.md | ||
| keywords = OpenAPI OpenAPI Petstore | ||
| python_requires = >= 3.10.* | ||
| python_requires = >= 3.11.* |
There was a problem hiding this comment.
P1: python_requires uses an invalid PEP 440 specifier, so setuptools can reject this sample’s metadata during build or installation. Use >= 3.11 instead.
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 samples/server/petstore/python-fastapi/setup.cfg, line 7:
<comment>`python_requires` uses an invalid PEP 440 specifier, so setuptools can reject this sample’s metadata during build or installation. Use `>= 3.11` instead.</comment>
<file context>
@@ -4,11 +4,11 @@ version = 3.4.5
long_description = file: README.md
keywords = OpenAPI OpenAPI Petstore
-python_requires = >= 3.10.*
+python_requires = >= 3.11.*
classifiers =
Operating System :: OS Independent
</file context>
| python_requires = >= 3.11.* | |
| python_requires = >= 3.11 |
| NAME = "openapi-client" | ||
| VERSION = "1.0.0" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P2: This update does not enforce the Python 3.11 floor because PYTHON_REQUIRES is never passed to setup(). Add python_requires=PYTHON_REQUIRES to the setup() call so package metadata rejects Python 3.10.
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 samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py, line 24:
<comment>This update does not enforce the Python 3.11 floor because `PYTHON_REQUIRES` is never passed to `setup()`. Add `python_requires=PYTHON_REQUIRES` to the `setup()` call so package metadata rejects Python 3.10.</comment>
<file context>
@@ -21,7 +21,7 @@
NAME = "openapi-client"
VERSION = "1.0.0"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
"urllib3 >= 2.7.0, < 3.0.0",
</file context>
| NAME = "{{{projectName}}}" | ||
| VERSION = "{{packageVersion}}" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P2: Changing this constant does not enforce the new minimum because setup() never receives python_requires=PYTHON_REQUIRES. Pass the constant into setup() so generated distributions publish the Python 3.11 requirement and installers reject unsupported Python versions.
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/setup.mustache, line 13:
<comment>Changing this constant does not enforce the new minimum because `setup()` never receives `python_requires=PYTHON_REQUIRES`. Pass the constant into `setup()` so generated distributions publish the Python 3.11 requirement and installers reject unsupported Python versions.</comment>
<file context>
@@ -10,7 +10,7 @@ from setuptools import setup, find_packages # noqa: H301
NAME = "{{{projectName}}}"
VERSION = "{{packageVersion}}"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
{{^async}}
</file context>
| NAME = "petstore-api" | ||
| VERSION = "1.0.0" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P2: The new minimum is not enforced for the documented python setup.py install path because PYTHON_REQUIRES is unused. Pass python_requires=PYTHON_REQUIRES to setup() (or remove the legacy path and documentation) so Python 3.10 installations are rejected consistently.
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 samples/openapi3/client/petstore/python-httpx/setup.py, line 23:
<comment>The new minimum is not enforced for the documented `python setup.py install` path because `PYTHON_REQUIRES` is unused. Pass `python_requires=PYTHON_REQUIRES` to `setup()` (or remove the legacy path and documentation) so Python 3.10 installations are rejected consistently.</comment>
<file context>
@@ -20,7 +20,7 @@
NAME = "petstore-api"
VERSION = "1.0.0"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
"python-dateutil >= 2.8.2",
</file context>
| NAME = "petstore-api" | ||
| VERSION = "1.0.0" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P2: PYTHON_REQUIRES is not passed to setup(), so this package still advertises no Python requirement and can be installed on Python 3.10 despite the intended support removal. Add python_requires=PYTHON_REQUIRES to the setup() call.
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 samples/openapi3/client/petstore/python-aiohttp/setup.py, line 23:
<comment>`PYTHON_REQUIRES` is not passed to `setup()`, so this package still advertises no Python requirement and can be installed on Python 3.10 despite the intended support removal. Add `python_requires=PYTHON_REQUIRES` to the `setup()` call.</comment>
<file context>
@@ -20,7 +20,7 @@
NAME = "petstore-api"
VERSION = "1.0.0"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
"python-dateutil >= 2.8.2",
</file context>
| NAME = "legacy-model-dict-client" | ||
| VERSION = "1.0.0" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P2: This version change does not affect the published package because setup() never passes PYTHON_REQUIRES as python_requires; add python_requires=PYTHON_REQUIRES so installers reject Python 3.10.
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 samples/client/others/python-legacy-model-dictionaries/setup.py, line 23:
<comment>This version change does not affect the published package because `setup()` never passes `PYTHON_REQUIRES` as `python_requires`; add `python_requires=PYTHON_REQUIRES` so installers reject Python 3.10.</comment>
<file context>
@@ -20,7 +20,7 @@
NAME = "legacy-model-dict-client"
VERSION = "1.0.0"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
"urllib3 >= 2.7.0, < 3.0.0",
</file context>
| NAME = "petstore-api" | ||
| VERSION = "1.0.0" | ||
| PYTHON_REQUIRES = ">= 3.10" | ||
| PYTHON_REQUIRES = ">= 3.11" |
There was a problem hiding this comment.
P2: This change does not enforce the Python 3.11 minimum for direct setup.py installations because PYTHON_REQUIRES is never passed to setup(). Add python_requires=PYTHON_REQUIRES to the setup call, or remove this legacy installation path if pyproject.toml is the only supported packaging path.
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 samples/openapi3/client/petstore/python-lazyImports/setup.py, line 23:
<comment>This change does not enforce the Python 3.11 minimum for direct `setup.py` installations because `PYTHON_REQUIRES` is never passed to `setup()`. Add `python_requires=PYTHON_REQUIRES` to the setup call, or remove this legacy installation path if `pyproject.toml` is the only supported packaging path.</comment>
<file context>
@@ -20,7 +20,7 @@
NAME = "petstore-api"
VERSION = "1.0.0"
-PYTHON_REQUIRES = ">= 3.10"
+PYTHON_REQUIRES = ">= 3.11"
REQUIRES = [
"urllib3 >= 2.7.0, < 3.0.0",
</file context>
| - "3.12" | ||
| - "3.13" | ||
| #- "3.14" | ||
| #- "3.15" |
There was a problem hiding this comment.
P2: Python 3.15 is still excluded from this workflow because the new matrix entry is commented out. Enable the entry so this pydantic-v1 echo sample actually validates the newly supported Python version.
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 .github/workflows/samples-python-pydantic-v1-client-echo-api.yaml, line 24:
<comment>Python 3.15 is still excluded from this workflow because the new matrix entry is commented out. Enable the entry so this pydantic-v1 echo sample actually validates the newly supported Python version.</comment>
<file context>
@@ -17,11 +17,11 @@ jobs:
- "3.12"
- "3.13"
#- "3.14"
+ #- "3.15"
steps:
- uses: actions/checkout@v7
</file context>
| #- "3.15" | |
| - "3.15" |
| - "3.12" | ||
| - "3.13" | ||
| - "3.14" | ||
| - "3.15" |
There was a problem hiding this comment.
P2: This new Python 3.15 matrix entry runs the Pydantic v1 samples, but Pydantic v1 does not support Python 3.15, so these CI jobs will fail or exercise an unsupported environment. Remove this entry or migrate the samples before testing Python 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 .github/workflows/samples-python-pydantic-v1-petstore.yaml, line 22:
<comment>This new Python 3.15 matrix entry runs the Pydantic v1 samples, but Pydantic v1 does not support Python 3.15, so these CI jobs will fail or exercise an unsupported environment. Remove this entry or migrate the samples before testing Python 3.15.</comment>
<file context>
@@ -15,11 +15,11 @@ jobs:
- "3.12"
- "3.13"
- "3.14"
+ - "3.15"
sample:
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
</file context>
|
please resolve the merge conflicts when you've time. |
|
Hi @wing328 Good morning! I've resolved the merge conflicts. By the way, while working on these changes, I noticed that some parts of the project still use Python versions that have reached EOL. Would it be okay if I opened separate PRs to remove support for those versions? |
Description
This PR removes Python 3.10 support from the Python generators, as it reached End of Life (EOL) on October 1, 2026.
Changes
Removed Python 3.10 from the supported Python versions.
Updated the minimum supported Python version to 3.11.
Updated the relevant generator configurations, documentation, and samples.
Related issue
Closes #25305
Additional context
Official Python version status: https://devguide.python.org/versions/
IMPORTANT:
This MR has part of code of this MR #25304
PR checklist
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.
Summary by cubic
Removes Python 3.10 support from the Python client and FastAPI server generators because it reached end of life. Minimum required version becomes 3.11, and CI matrices now run 3.11 through 3.15.
Test adjustments
test_http_signature.pysamples to a pycryptodome API change: exports RSA keys withformat='PEM'andpkcs=1, and matches either of two possible error messages.Written for commit 5ea99b7. Summary will update on new commits.