diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-03-08 11:08:17 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-03-08 13:35:00 +0100 |
commit | c1e7cd7d73a20d21e665797ac0531c7748128dad (patch) | |
tree | c72b8e59a08511d2eff6bba3cff4bea9c51f154c /dev-python/loky | |
parent | x11-wm/xpra: Bump to 4.1.1, drop old 4.1 (diff) | |
download | gentoo-c1e7cd7d73a20d21e665797ac0531c7748128dad.tar.gz gentoo-c1e7cd7d73a20d21e665797ac0531c7748128dad.tar.bz2 gentoo-c1e7cd7d73a20d21e665797ac0531c7748128dad.zip |
dev-python/loky: Fix tests with newer CPython
Fix test failure with newer versions of CPython due to incorrect loading
of libc via ctypes.
Closes: https://bugs.gentoo.org/774789
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/loky')
-rw-r--r-- | dev-python/loky/files/loky-2.9.0-libc.patch | 28 | ||||
-rw-r--r-- | dev-python/loky/loky-2.9.0.ebuild | 6 |
2 files changed, 33 insertions, 1 deletions
diff --git a/dev-python/loky/files/loky-2.9.0-libc.patch b/dev-python/loky/files/loky-2.9.0-libc.patch new file mode 100644 index 000000000000..58cceab01eb2 --- /dev/null +++ b/dev-python/loky/files/loky-2.9.0-libc.patch @@ -0,0 +1,28 @@ +From 4100bb481dd1599be3deae8539ff9eac2d9b7104 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 8 Mar 2021 10:32:38 +0100 +Subject: [PATCH] FIX load libc correctly in test_reusable_executor + +Fix test_reusable_executor to load libc via "c" library rather than +"libc". The latter is incorrect, and does not work in the newest +versions of Python anymore, see https://bugs.python.org/issue42580. +--- + tests/test_reusable_executor.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_reusable_executor.py b/tests/test_reusable_executor.py +index 1ff5b8b..d24d2de 100644 +--- a/tests/test_reusable_executor.py ++++ b/tests/test_reusable_executor.py +@@ -32,7 +32,7 @@ if sys.platform == "win32": + else: + from signal import SIGKILL + from ctypes.util import find_library +- libc = ctypes.CDLL(find_library("libc")) ++ libc = ctypes.CDLL(find_library("c")) + + + try: +-- +2.30.1 + diff --git a/dev-python/loky/loky-2.9.0.ebuild b/dev-python/loky/loky-2.9.0.ebuild index 70165402b043..a4096ef4abeb 100644 --- a/dev-python/loky/loky-2.9.0.ebuild +++ b/dev-python/loky/loky-2.9.0.ebuild @@ -25,6 +25,10 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + "${FILESDIR}"/${P}-libc.patch +) + python_test() { local args=( # docker, seriously? @@ -34,5 +38,5 @@ python_test() { --skip-high-memory ) - pytest -vv "${args[@]}" || die "Tests failed on ${EPYTHON}" + epytest "${args[@]}" } |