gentoo/dev-python/python-jose/files/python-jose-3.5.0-test-failure.patch
Alfred Wingate 3d85bd4fe6
dev-python/python-jose: enable py3.14
* Fix test failure with new cryptography
* Use EPYTEST_PLUGINS

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44560
Closes: https://github.com/gentoo/gentoo/pull/44560
Signed-off-by: Sam James <sam@gentoo.org>
2025-11-12 09:40:34 +00:00

23 lines
916 B
Diff

Appears to be cryptography related. Works with and without the patch for
cryptography-45.0.6
From 7c0e4c6640bdc9cd60ac66d96d5d90f4377873db Mon Sep 17 00:00:00 2001
From: dotlambda <github@dotlambda.de>
Date: Tue, 21 Oct 2025 20:29:01 -0700
Subject: [PATCH] fix test_incorrect_public_key_hmac_signing
It used to fail with
TypeError: curve must be an EllipticCurve instance
--- a/tests/algorithms/test_EC.py
+++ b/tests/algorithms/test_EC.py
@@ -235,7 +235,7 @@ def test_incorrect_public_key_hmac_signing():
def b64(x):
return base64.urlsafe_b64encode(x).replace(b"=", b"")
- KEY = CryptographyEc.generate_private_key(CryptographyEc.SECP256R1)
+ KEY = CryptographyEc.generate_private_key(CryptographyEc.SECP256R1(), CryptographyEc.SECP256R1)
PUBKEY = KEY.public_key().public_bytes(
encoding=serialization.Encoding.OpenSSH,
format=serialization.PublicFormat.OpenSSH,