summaryrefslogtreecommitdiff
path: root/dev-python/loky
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/loky')
-rw-r--r--dev-python/loky/Manifest5
-rw-r--r--dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch41
-rw-r--r--dev-python/loky/loky-2.9.0.ebuild5
-rw-r--r--dev-python/loky/metadata.xml2
4 files changed, 50 insertions, 3 deletions
diff --git a/dev-python/loky/Manifest b/dev-python/loky/Manifest
index 94ae98700cb7..2797b0f8a4b8 100644
--- a/dev-python/loky/Manifest
+++ b/dev-python/loky/Manifest
@@ -1,4 +1,5 @@
+AUX loky-2.9.0-fix-py3.10-tests.patch 1554 BLAKE2B de9edaf32d937cf15f38c40b1c35238eb23602aca47014af6eb8418e1acfc141a6baeb4021a48fede6ae12b31cfc6533ce7f0339dd51f7297ad244f1adbdb007 SHA512 2e236f8c9ffbfb24ce1e646bbee4ef62d9af7472b695beecb1926d20fb467e7a67d01f27cb4c6b8e08a91a93195d68a7b3b778ad5258390bb482ba70cfee5d2c
AUX loky-2.9.0-libc.patch 956 BLAKE2B a03de811cb32e728c22b2637106ffd3c969e9fbbbd45deb180ac83d9c44e81b7b5eb0744816abd4a1083d9d47c817db5c02f5f5f6c448f944365299dbd97a044 SHA512 c2e74f96a8f70ec9817cc517fb13ecb8414d6a9157d882ba15af05a81ec70df0edcdb6a8a02c96e7ecc4731813cb86932832fe61b5e19653164af9f7c68dc25a
DIST loky-2.9.0.tar.gz 115019 BLAKE2B 2aa2042e32821b67db8b8de12d4b380d22af93d308bb35878271a4859325d6740a3bdab70b464a2c0d0af143903c8af3da81b4b804605cdae88779fefd7971a6 SHA512 d49354b834251f6f05a689ac44464aafa5a7a5b4a8ef84a308ec3bda138e810fc3dc31aa628307984dc69386a210f442d4c202b9499ae3e3864837b47a5b0cd9
-EBUILD loky-2.9.0.ebuild 1021 BLAKE2B 2ea8aee9ab4b527a6e72b4f7a6cc7797f1da8ccb265911fa954bb986d8202981038788cfbe10333948de7887d845a4bbc4aa10b13fbedcfe0b871fd99ae979b2 SHA512 503f67e0cde83f3ee71efd5bf66a03cd9770f418d84babc5c5be4ce3492a803415c60504c45140e6802fc2f4a416c5d7ddf483ac8692ede8c3a59361d29854b4
-MISC metadata.xml 307 BLAKE2B 8b13804536c6ca6c44445e1fb411e7e54e40279ac6ecbe51945a75508ce221c78d11007b6600e6706287db6299b2015b7b9b282cbc05486ecca189983b048a7b SHA512 a78a0767759287a9e4bb5a4fcbc655820d619802db28c72cb84300557fd53f25fe9d5e2fdf2873649bf3bb01a5b5129285a304f111695891287aa012f6f937fe
+EBUILD loky-2.9.0.ebuild 1098 BLAKE2B b185322d31bb11de031b833fb20f2a892afdedd2117953c238a7eaf89ade3d0585780876cf09b876a0656994bd5ff7a5539a73404c141d4dbafd815f16368c38 SHA512 90a31ee5f4232062836ab51f4341fd189dd521946e554c249b5e7f54bac3d1db278482ea8bfb56481c7b376d6fa4ccf622e55629f5c9a45a442d454e4000d8b9
+MISC metadata.xml 382 BLAKE2B 32cbc1465ec3aaef961a70862a458cdf20b7eaeb8b4e266a34eea917b58bdc9132cd59958da7b0d390197ae2d8f332d9c835e616c52570fe9338e7085cf7b664 SHA512 25b107a76c02e82bc2ee28a0f7abb1ac0a736a19f497e27b39911f176cde604cb5e61f447616f1a6115806b17251d94dde0186c2a848fedc2b86956fae7ea834
diff --git a/dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch b/dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch
new file mode 100644
index 000000000000..51cbfb348a51
--- /dev/null
+++ b/dev-python/loky/files/loky-2.9.0-fix-py3.10-tests.patch
@@ -0,0 +1,41 @@
+From 0d31dc24ca9688c11d1fe53fa1283728ecc50706 Mon Sep 17 00:00:00 2001
+From: Arthur Zamarin <arthurzam@gmail.com>
+Date: Mon, 2 Aug 2021 18:35:31 +0300
+Subject: [PATCH] Fix no attribute import_module for python 3.10
+
+In python 3.10, the `import_module` has moved from the
+`test.support` module to `test.support.import_helper`.
+
+As fix, try to import the from the new place and if unknown try from
+the old place.
+---
+ tests/_test_process_executor.py | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/tests/_test_process_executor.py b/tests/_test_process_executor.py
+index 65d9a2c9..3bd0b12d 100644
+--- a/tests/_test_process_executor.py
++++ b/tests/_test_process_executor.py
+@@ -1,15 +1,18 @@
+ from __future__ import print_function
+ try:
+- import test.support
++ try:
++ from test.support.import_helper import import_module
++ except ImportError:
++ from test.support import import_module
+
+ # Skip tests if _multiprocessing wasn't built.
+- test.support.import_module('_multiprocessing')
++ import_module('_multiprocessing')
+ # Skip tests if sem_open implementation is broken.
+- test.support.import_module('multiprocessing.synchronize')
++ import_module('multiprocessing.synchronize')
+ # import threading after _multiprocessing to raise a more revelant error
+ # message: "No module named _multiprocessing" if multiprocessing is not
+ # compiled without thread support.
+- test.support.import_module('threading')
++ import_module('threading')
+ except ImportError:
+ pass
+
diff --git a/dev-python/loky/loky-2.9.0.ebuild b/dev-python/loky/loky-2.9.0.ebuild
index 6a166599dde5..25edf84e76a1 100644
--- a/dev-python/loky/loky-2.9.0.ebuild
+++ b/dev-python/loky/loky-2.9.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Robust and reusable Executor for joblib"
@@ -27,6 +27,7 @@ distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}"/${P}-libc.patch
+ "${FILESDIR}"/${P}-fix-py3.10-tests.patch
)
python_test() {
@@ -38,6 +39,8 @@ python_test() {
# one test that uses a lot of memory, also broken on 32-bit
# platforms
--skip-high-memory
+ # breaks teardown
+ -p no:xvfb
)
epytest "${args[@]}"
diff --git a/dev-python/loky/metadata.xml b/dev-python/loky/metadata.xml
index def50b74ac1a..aec9cefdf350 100644
--- a/dev-python/loky/metadata.xml
+++ b/dev-python/loky/metadata.xml
@@ -5,7 +5,9 @@
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
+ <stabilize-allarches/>
<upstream>
<remote-id type="pypi">loky</remote-id>
+ <remote-id type="github">joblib/loky</remote-id>
</upstream>
</pkgmetadata>