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/automat/files/, dev-python/automat/
Date: Thu, 12 May 2022 13:36:36
Message-Id: 1652362584.cbaa7e66a529dfe1d33f131cd1385ad6d08a2163.mgorny@gentoo
1 commit: cbaa7e66a529dfe1d33f131cd1385ad6d08a2163
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 12 13:29:57 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu May 12 13:36:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbaa7e66
7
8 dev-python/automat: Enable py3.11
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/automat/automat-20.2.0-r1.ebuild | 3 ++-
13 .../automat/files/automat-20.2.0-py311.patch | 23 ++++++++++++++++++++++
14 2 files changed, 25 insertions(+), 1 deletion(-)
15
16 diff --git a/dev-python/automat/automat-20.2.0-r1.ebuild b/dev-python/automat/automat-20.2.0-r1.ebuild
17 index d7ad5e62e710..d56a5190718a 100644
18 --- a/dev-python/automat/automat-20.2.0-r1.ebuild
19 +++ b/dev-python/automat/automat-20.2.0-r1.ebuild
20 @@ -4,7 +4,7 @@
21 EAPI=8
22
23 DISTUTILS_USE_PEP517=setuptools
24 -PYTHON_COMPAT=( python3_{8..10} pypy3 )
25 +PYTHON_COMPAT=( python3_{8..11} pypy3 )
26
27 inherit distutils-r1
28
29 @@ -30,6 +30,7 @@ BDEPEND="
30 PATCHES=(
31 "${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.patch"
32 "${FILESDIR}/test_visualize-twisted-import-errors.patch"
33 + "${FILESDIR}/${P}-py311.patch"
34 )
35
36 distutils_enable_tests pytest
37
38 diff --git a/dev-python/automat/files/automat-20.2.0-py311.patch b/dev-python/automat/files/automat-20.2.0-py311.patch
39 new file mode 100644
40 index 000000000000..14ca69e7235d
41 --- /dev/null
42 +++ b/dev-python/automat/files/automat-20.2.0-py311.patch
43 @@ -0,0 +1,23 @@
44 +https://github.com/glyph/automat/commit/d0c2845ead9b8f576042d42134bfb5c63086be39
45 +
46 +diff --git a/automat/_introspection.py b/automat/_introspection.py
47 +index 3f7307d..403cddb 100644
48 +--- a/automat/_introspection.py
49 ++++ b/automat/_introspection.py
50 +@@ -6,6 +6,8 @@
51 +
52 +
53 + def copycode(template, changes):
54 ++ if hasattr(code, "replace"):
55 ++ return template.replace(**{"co_" + k : v for k, v in changes.items()})
56 + names = [
57 + "argcount", "nlocals", "stacksize", "flags", "code", "consts",
58 + "names", "varnames", "filename", "name", "firstlineno", "lnotab",
59 +@@ -23,7 +25,6 @@ def copycode(template, changes):
60 + return code(*values)
61 +
62 +
63 +-
64 + def copyfunction(template, funcchanges, codechanges):
65 + names = [
66 + "globals", "name", "defaults", "closure",