Repository navigation
Add support to python 3.15 #25304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to python 3.15 #25304
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Previously, RSA export defaulted to PKCS#1, where 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, The fix uses |
||
| passphrase=cls.private_key_passphrase, | ||
| protection='PEM' | ||
| pkcs=1 | ||
| ) | ||
| with open(cls.rsa4096_key_path, "wb") as f: | ||
| f.write(private_key) | ||
|
|
@@ -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: | ||
|
|
||
There was a problem hiding this comment.
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