Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/snakeoil/, dev-python/snakeoil/files/
Date: Sat, 30 May 2020 07:12:20
Message-Id: 1590822726.4b3dc2328e3f321e94050640875505ab66cd9d7c.mgorny@gentoo
1 commit: 4b3dc2328e3f321e94050640875505ab66cd9d7c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 30 06:44:25 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat May 30 07:12:06 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b3dc232
7
8 dev-python/snakeoil: Port to py39
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../snakeoil/files/snakeoil-0.8.8-py39.patch | 28 ++++++++++++++++++++++
13 dev-python/snakeoil/snakeoil-0.8.8.ebuild | 6 ++++-
14 dev-python/snakeoil/snakeoil-9999.ebuild | 2 +-
15 3 files changed, 34 insertions(+), 2 deletions(-)
16
17 diff --git a/dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch b/dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch
18 new file mode 100644
19 index 00000000000..dbda88bd588
20 --- /dev/null
21 +++ b/dev-python/snakeoil/files/snakeoil-0.8.8-py39.patch
22 @@ -0,0 +1,28 @@
23 +From eeb1f45216eced42b386d6ea65eadc49798c7174 Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
25 +Date: Thu, 28 May 2020 14:00:34 +0200
26 +Subject: [PATCH] test_obj: Ignore __class_getitem__
27 +
28 +Ignore __class_getitem__ special that was added to some stdlib objects
29 +in Python 3.9. It is used as part of type declarations.
30 +---
31 + tests/module/test_obj.py | 3 ++-
32 + 1 file changed, 2 insertions(+), 1 deletion(-)
33 +
34 +diff --git a/tests/module/test_obj.py b/tests/module/test_obj.py
35 +index 03b100c..43c5c47 100644
36 +--- a/tests/module/test_obj.py
37 ++++ b/tests/module/test_obj.py
38 +@@ -23,7 +23,8 @@ class TestDelayedInstantiation:
39 + def assertKls(cls, ignores=(),
40 + default_ignores=("__new__", "__init__", "__init_subclass__",
41 + "__getattribute__", "__class__",
42 +- "__getnewargs__", "__doc__")):
43 ++ "__getnewargs__", "__doc__",
44 ++ "__class_getitem__")):
45 + required = set(x for x in dir(cls)
46 + if x.startswith("__") and x.endswith("__"))
47 + missing = required.difference(obj.kls_descriptors)
48 +--
49 +2.26.2
50 +
51
52 diff --git a/dev-python/snakeoil/snakeoil-0.8.8.ebuild b/dev-python/snakeoil/snakeoil-0.8.8.ebuild
53 index c762561aef9..72c91229bc3 100644
54 --- a/dev-python/snakeoil/snakeoil-0.8.8.ebuild
55 +++ b/dev-python/snakeoil/snakeoil-0.8.8.ebuild
56 @@ -2,7 +2,7 @@
57 # Distributed under the terms of the GNU General Public License v2
58
59 EAPI=6
60 -PYTHON_COMPAT=( python3_{6,7,8} )
61 +PYTHON_COMPAT=( python3_{6..9} )
62 PYTHON_REQ_USE="threads(+)"
63 inherit distutils-r1
64
65 @@ -27,6 +27,10 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
66 "
67 [[ ${PV} == 9999 ]] && DEPEND+=" dev-python/cython[${PYTHON_USEDEP}]"
68
69 +PATCHES=(
70 + "${FILESDIR}"/${P}-py39.patch
71 +)
72 +
73 python_test() {
74 esetup.py test
75 }
76
77 diff --git a/dev-python/snakeoil/snakeoil-9999.ebuild b/dev-python/snakeoil/snakeoil-9999.ebuild
78 index 1b7261487c4..68c9d150960 100644
79 --- a/dev-python/snakeoil/snakeoil-9999.ebuild
80 +++ b/dev-python/snakeoil/snakeoil-9999.ebuild
81 @@ -2,7 +2,7 @@
82 # Distributed under the terms of the GNU General Public License v2
83
84 EAPI=6
85 -PYTHON_COMPAT=( python3_{6,7,8} )
86 +PYTHON_COMPAT=( python3_{6..9} )
87 PYTHON_REQ_USE="threads(+)"
88 inherit distutils-r1