diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-05-12 15:29:57 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-05-12 15:36:24 +0200 |
commit | cbaa7e66a529dfe1d33f131cd1385ad6d08a2163 (patch) | |
tree | 2afef5747481347a25e5573e4d53f465e7c60733 /dev-python/automat | |
parent | dev-python/automat: EAPI 8, PEP517 (diff) | |
download | gentoo-cbaa7e66a529dfe1d33f131cd1385ad6d08a2163.tar.gz gentoo-cbaa7e66a529dfe1d33f131cd1385ad6d08a2163.tar.bz2 gentoo-cbaa7e66a529dfe1d33f131cd1385ad6d08a2163.zip |
dev-python/automat: Enable py3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/automat')
-rw-r--r-- | dev-python/automat/automat-20.2.0-r1.ebuild | 3 | ||||
-rw-r--r-- | dev-python/automat/files/automat-20.2.0-py311.patch | 23 |
2 files changed, 25 insertions, 1 deletions
diff --git a/dev-python/automat/automat-20.2.0-r1.ebuild b/dev-python/automat/automat-20.2.0-r1.ebuild index d7ad5e62e710..d56a5190718a 100644 --- a/dev-python/automat/automat-20.2.0-r1.ebuild +++ b/dev-python/automat/automat-20.2.0-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..10} pypy3 ) +PYTHON_COMPAT=( python3_{8..11} pypy3 ) inherit distutils-r1 @@ -30,6 +30,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.patch" "${FILESDIR}/test_visualize-twisted-import-errors.patch" + "${FILESDIR}/${P}-py311.patch" ) distutils_enable_tests pytest diff --git a/dev-python/automat/files/automat-20.2.0-py311.patch b/dev-python/automat/files/automat-20.2.0-py311.patch new file mode 100644 index 000000000000..14ca69e7235d --- /dev/null +++ b/dev-python/automat/files/automat-20.2.0-py311.patch @@ -0,0 +1,23 @@ +https://github.com/glyph/automat/commit/d0c2845ead9b8f576042d42134bfb5c63086be39 + +diff --git a/automat/_introspection.py b/automat/_introspection.py +index 3f7307d..403cddb 100644 +--- a/automat/_introspection.py ++++ b/automat/_introspection.py +@@ -6,6 +6,8 @@ + + + def copycode(template, changes): ++ if hasattr(code, "replace"): ++ return template.replace(**{"co_" + k : v for k, v in changes.items()}) + names = [ + "argcount", "nlocals", "stacksize", "flags", "code", "consts", + "names", "varnames", "filename", "name", "firstlineno", "lnotab", +@@ -23,7 +25,6 @@ def copycode(template, changes): + return code(*values) + + +- + def copyfunction(template, funcchanges, codechanges): + names = [ + "globals", "name", "defaults", "closure", |