From: Michał Górny Date: Sun, 12 Apr 2020 10:34:41 +0000 (+0200) Subject: dev-lang/python: Fix test failure due to importing numpy in 3.8+ X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1aafbb4cdaf3067e41a772660b28dc1843ae4e8d;p=gentoo.git dev-lang/python: Fix test failure due to importing numpy in 3.8+ Signed-off-by: Michał Górny --- diff --git a/dev-lang/python/files/test-__all__-numpy.patch b/dev-lang/python/files/test-__all__-numpy.patch new file mode 100644 index 000000000000..1b91abbf6f60 --- /dev/null +++ b/dev-lang/python/files/test-__all__-numpy.patch @@ -0,0 +1,13 @@ +diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py +index c077881511..0728bef6c4 100644 +--- a/Lib/test/test___all__.py ++++ b/Lib/test/test___all__.py +@@ -71,6 +71,8 @@ class AllTest(unittest.TestCase): + blacklist = set([ + # Will raise a SyntaxError when compiling the exec statement + '__future__', ++ # imports numpy which causes warnings ++ 'test.test_pickletools', + ]) + + if not sys.platform.startswith('java'): diff --git a/dev-lang/python/python-3.8.2-r1.ebuild b/dev-lang/python/python-3.8.2-r1.ebuild index 35d435345995..d6b9c2e9ec3c 100644 --- a/dev-lang/python/python-3.8.2-r1.ebuild +++ b/dev-lang/python/python-3.8.2-r1.ebuild @@ -67,6 +67,8 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" + # add module importing numpy to blacklist + "${FILESDIR}/test-__all__-numpy.patch" ) default diff --git a/dev-lang/python/python-3.9.0_alpha5.ebuild b/dev-lang/python/python-3.9.0_alpha5.ebuild index 49d4c9d5f877..2e9353ebaf6d 100644 --- a/dev-lang/python/python-3.9.0_alpha5.ebuild +++ b/dev-lang/python/python-3.9.0_alpha5.ebuild @@ -83,6 +83,8 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" + # add module importing numpy to blacklist + "${FILESDIR}/test-__all__-numpy.patch" ) default