dev-lang/python: Fix test failure due to importing numpy in 3.8+
authorMichał Górny <mgorny@gentoo.org>
Sun, 12 Apr 2020 10:34:41 +0000 (12:34 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 12 Apr 2020 11:29:49 +0000 (13:29 +0200)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-lang/python/files/test-__all__-numpy.patch [new file with mode: 0644]
dev-lang/python/python-3.8.2-r1.ebuild
dev-lang/python/python-3.9.0_alpha5.ebuild

diff --git a/dev-lang/python/files/test-__all__-numpy.patch b/dev-lang/python/files/test-__all__-numpy.patch
new file mode 100644 (file)
index 0000000..1b91abb
--- /dev/null
@@ -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'):
index 35d43534599575c7684f2e89120774d697c63671..d6b9c2e9ec3cae231a139fcc8e2563c649f2fa0b 100644 (file)
@@ -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
index 49d4c9d5f87775bf469f0ed13d937b781ec59492..2e9353ebaf6d3876987aab82c0162139a4652180 100644 (file)
@@ -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