summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-05-30 08:44:25 +0200
committerMichał Górny <mgorny@gentoo.org>2020-05-30 09:12:06 +0200
commit4b3dc2328e3f321e94050640875505ab66cd9d7c (patch)
tree11311dce4a6b43d540d1229962b6020640fc657a /dev-python/snakeoil
parentdev-python/isort: Keyword 4.3.21_p2-r1 ppc64, #702190 (diff)
downloadgentoo-4b3dc2328e3f321e94050640875505ab66cd9d7c.tar.gz
gentoo-4b3dc2328e3f321e94050640875505ab66cd9d7c.tar.bz2
gentoo-4b3dc2328e3f321e94050640875505ab66cd9d7c.zip
dev-python/snakeoil: Port to py39
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/snakeoil')
-rw-r--r--dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch28
-rw-r--r--dev-python/snakeoil/snakeoil-0.8.8.ebuild6
-rw-r--r--dev-python/snakeoil/snakeoil-9999.ebuild2
3 files changed, 34 insertions, 2 deletions
diff --git a/dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch b/dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch
new file mode 100644
index 000000000000..dbda88bd588f
--- /dev/null
+++ b/dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch
@@ -0,0 +1,28 @@
+From eeb1f45216eced42b386d6ea65eadc49798c7174 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 28 May 2020 14:00:34 +0200
+Subject: [PATCH] test_obj: Ignore __class_getitem__
+
+Ignore __class_getitem__ special that was added to some stdlib objects
+in Python 3.9. It is used as part of type declarations.
+---
+ tests/module/test_obj.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/module/test_obj.py b/tests/module/test_obj.py
+index 03b100c..43c5c47 100644
+--- a/tests/module/test_obj.py
++++ b/tests/module/test_obj.py
+@@ -23,7 +23,8 @@ class TestDelayedInstantiation:
+ def assertKls(cls, ignores=(),
+ default_ignores=("__new__", "__init__", "__init_subclass__",
+ "__getattribute__", "__class__",
+- "__getnewargs__", "__doc__")):
++ "__getnewargs__", "__doc__",
++ "__class_getitem__")):
+ required = set(x for x in dir(cls)
+ if x.startswith("__") and x.endswith("__"))
+ missing = required.difference(obj.kls_descriptors)
+--
+2.26.2
+
diff --git a/dev-python/snakeoil/snakeoil-0.8.8.ebuild b/dev-python/snakeoil/snakeoil-0.8.8.ebuild
index c762561aef96..72c91229bc3c 100644
--- a/dev-python/snakeoil/snakeoil-0.8.8.ebuild
+++ b/dev-python/snakeoil/snakeoil-0.8.8.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6..9} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
@@ -27,6 +27,10 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
"
[[ ${PV} == 9999 ]] && DEPEND+=" dev-python/cython[${PYTHON_USEDEP}]"
+PATCHES=(
+ "${FILESDIR}"/${P}-py39.patch
+)
+
python_test() {
esetup.py test
}
diff --git a/dev-python/snakeoil/snakeoil-9999.ebuild b/dev-python/snakeoil/snakeoil-9999.ebuild
index 1b7261487c4b..68c9d1509604 100644
--- a/dev-python/snakeoil/snakeoil-9999.ebuild
+++ b/dev-python/snakeoil/snakeoil-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6..9} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1