Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/samples-python-client-echo-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
Expand All @@ -34,7 +35,7 @@ jobs:
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r requirements.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-python-petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
sample:
- samples/openapi3/client/petstore/python-aiohttp
- samples/openapi3/client/petstore/python-httpx2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- "3.12"
- "3.13"
#- "3.14"
#- "3.15"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
Expand All @@ -33,7 +34,7 @@ jobs:
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r requirements.txt
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-python-pydantic-v1-petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "3.12"
- "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.

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>
Suggested change
- "3.15"
#- "3.15"

sample:
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
- samples/openapi3/client/petstore/python-pydantic-v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions samples/client/echo_api/python/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
1 change: 1 addition & 0 deletions samples/client/echo_api/python/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions samples/openapi3/client/petstore/python-httpx/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
1 change: 1 addition & 0 deletions samples/openapi3/client/petstore/python-httpx/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions samples/openapi3/client/petstore/python-httpx2/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
1 change: 1 addition & 0 deletions samples/openapi3/client/petstore/python-httpx2/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ def setUpFiles(cls):
if not os.path.exists(cls.rsa4096_key_path):
key = RSA.generate(4096)
private_key = key.export_key(
format='PEM',

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.

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.

passphrase=cls.private_key_passphrase,
protection='PEM'
pkcs=1
)
with open(cls.rsa4096_key_path, "wb") as f:
f.write(private_key)
Expand Down Expand Up @@ -451,14 +452,16 @@ def test_invalid_configuration(self):
'Exception message: {0}'.format(str(cm.exception)))

# Private key passphrase is missing but key is encrypted.
with self.assertRaises(Exception) as cm:
with self.assertRaisesRegex(
ValueError,
r'Not a valid clear PKCS#8 structure|'
r'The private key is encrypted: a passphrase is required'
):
signing_cfg = signing.HttpSigningConfiguration(
key_id="my-key-id",
signing_scheme=signing.SCHEME_HS2019,
private_key_path=self.ec_p521_key_path,
)
self.assertTrue(re.match('Not a valid clear PKCS#8 structure', str(cm.exception)),
'Exception message: {0}'.format(str(cm.exception)))

# File containing private key must exist.
with self.assertRaises(Exception) as cm:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions samples/openapi3/client/petstore/python/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pytest-3.13:
pytest-3.14:
extends: .pytest
image: python:3.14-alpine
pytest-3.15:
extends: .pytest
image: python:3.15-alpine
1 change: 1 addition & 0 deletions samples/openapi3/client/petstore/python/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
# uncomment the following if needed
#- "3.14-dev" # 3.14 development branch
#- "nightly" # nightly build
Expand Down
Loading