commit:     3d85bd4fe6b0d85657ea8bebb44a10a2a4cbf5b6
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Mon Nov 10 02:34:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 12 09:40:34 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d85bd4f

dev-python/python-jose: enable py3.14

* Fix test failure with new cryptography
* Use EPYTEST_PLUGINS

Signed-off-by: Alfred Wingate <parona <AT> 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 <AT> gentoo.org>

 .../files/python-jose-3.5.0-test-failure.patch     | 22 ++++++++++++++++++++++
 dev-python/python-jose/python-jose-3.5.0.ebuild    |  9 +++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/dev-python/python-jose/files/python-jose-3.5.0-test-failure.patch 
b/dev-python/python-jose/files/python-jose-3.5.0-test-failure.patch
new file mode 100644
index 000000000000..f3ed737bfb66
--- /dev/null
+++ b/dev-python/python-jose/files/python-jose-3.5.0-test-failure.patch
@@ -0,0 +1,22 @@
+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 <[email protected]>
+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,

diff --git a/dev-python/python-jose/python-jose-3.5.0.ebuild 
b/dev-python/python-jose/python-jose-3.5.0.ebuild
index 2ea6f7d00803..8cb410f8abf8 100644
--- a/dev-python/python-jose/python-jose-3.5.0.ebuild
+++ b/dev-python/python-jose/python-jose-3.5.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{11..13} )
+PYTHON_COMPAT=( python3_{11..14} )
 
 inherit distutils-r1
 
@@ -33,9 +33,14 @@ RDEPEND="
        dev-python/six[${PYTHON_USEDEP}]
 "
 
+EPYTEST_PLUGINS=()
 distutils_enable_tests pytest
 distutils_enable_sphinx docs
 
+PATCHES=(
+       "${FILESDIR}"/python-jose-3.5.0-test-failure.patch
+)
+
 python_prepare_all() {
        distutils-r1_python_prepare_all
 
@@ -44,6 +49,6 @@ python_prepare_all() {
 }
 
 python_test() {
-       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       # bug #723616
        epytest -o addopts=
 }

Reply via email to