Repository navigation
Add support to python 3.15 - #25304
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.
1 issue found across 38 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=".github/workflows/samples-python-pydantic-v1-petstore.yaml">
<violation number="1" location=".github/workflows/samples-python-pydantic-v1-petstore.yaml:23">
P1: This enables Python 3.15 for the Pydantic v1 Petstore samples, but Pydantic v1 does not support Python 3.14 or newer. The new matrix jobs will fail; keep 3.15 commented out like the Pydantic v1 Echo workflow.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
| - "3.12" | ||
| - "3.13" | ||
| - "3.14" | ||
| - "3.15" |
There was a problem hiding this comment.
P1: This enables Python 3.15 for the Pydantic v1 Petstore samples, but Pydantic v1 does not support Python 3.14 or newer. The new matrix jobs will fail; keep 3.15 commented out like the Pydantic v1 Echo workflow.
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 23:
<comment>This enables Python 3.15 for the Pydantic v1 Petstore samples, but Pydantic v1 does not support Python 3.14 or newer. The new matrix jobs will fail; keep 3.15 commented out like the Pydantic v1 Echo workflow.</comment>
<file context>
@@ -20,6 +20,7 @@ jobs:
- "3.12"
- "3.13"
- "3.14"
+ - "3.15"
sample:
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
</file context>
| - "3.15" | |
| #- "3.15" |
| if not os.path.exists(cls.rsa4096_key_path): | ||
| key = RSA.generate(4096) | ||
| private_key = key.export_key( | ||
| format='PEM', |
There was a problem hiding this comment.
This failure comes from a PyCryptodome dependency update exposing an existing issue in the test setup.
The test passes protection='PEM' to RSA.export_key(). According to the export_key() documentation, PEM is an output format, while protection specifies the encryption scheme.
Previously, RSA export defaulted to PKCS#1, where protection was silently ignored. PyCryptodome 4.0 changed the default to PKCS#8 when a passphrase is supplied. As a result, PEM is now interpreted as an encryption scheme, causing ValueError: Unknown protection PEM.
This change is documented under 4.0.0 → Breaking changes, in the item beginning with “Exporting a private key with a passphrase”: [PyCryptodome changelog](https://www.pycryptodome.org/src/changelog).
The dependency constraint, pycryptodome >= 3.9.0, allows the new major version. The failure also occurs on Python 3.10, independently of the Python 3.15 addition.
The fix uses format='PEM' and explicitly sets pkcs=1 to preserve the key format expected by the signing code. All six HTTP signature tests pass with both PyCryptodome 3.24.1 and 4.0.1.
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Description
This PR adds support for Python 3.15 to the Python generators.
Python 3.15 was officially released on October 9, 2026.
Changes
Added Python 3.15 as a supported version.
Updated the Python generator configuration and documentation.
Updated the relevant generated samples.
Related issue
Closes #25303
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
Adds Python 3.15 support to the Python generator CI templates and regenerated sample clients, and fixes a pycryptodome breaking change in the HTTP signature tests. Closes #25303.
test_http_signature.pyto use pycryptodome's current key export API and accept either of the two encrypted-key error messages.Written for commit 41991c6. Summary will update on new commits.