diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-07-11 20:43:55 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-07-11 21:23:27 +0200 |
commit | a6bd7d348c44f891b04d6a5db669a9ab0b0110ba (patch) | |
tree | d1c4a575cd7c148e3cf82e278fbef75e8af28c50 /dev-python | |
parent | profiles: treeclean most of dev-php/PEAR* (diff) | |
download | gentoo-a6bd7d348c44f891b04d6a5db669a9ab0b0110ba.tar.gz gentoo-a6bd7d348c44f891b04d6a5db669a9ab0b0110ba.tar.bz2 gentoo-a6bd7d348c44f891b04d6a5db669a9ab0b0110ba.zip |
dev-python/cloudpickle: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/cloudpickle/cloudpickle-3.0.0.ebuild | 8 | ||||
-rw-r--r-- | dev-python/cloudpickle/files/cloudpickle-3.0.0-py313.patch | 32 |
2 files changed, 38 insertions, 2 deletions
diff --git a/dev-python/cloudpickle/cloudpickle-3.0.0.ebuild b/dev-python/cloudpickle/cloudpickle-3.0.0.ebuild index f0be98a6dc11..d0b42b0d4e92 100644 --- a/dev-python/cloudpickle/cloudpickle-3.0.0.ebuild +++ b/dev-python/cloudpickle/cloudpickle-3.0.0.ebuild @@ -4,8 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=flit -# py3.13: https://github.com/cloudpipe/cloudpickle/issues/533 -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 @@ -31,6 +30,11 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + # https://github.com/cloudpipe/cloudpickle/pull/534 + "${FILESDIR}/${P}-py313.patch" +) + python_test() { local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 local -x PYTHONPATH=${PYTHONPATH}:tests/cloudpickle_testpkg diff --git a/dev-python/cloudpickle/files/cloudpickle-3.0.0-py313.patch b/dev-python/cloudpickle/files/cloudpickle-3.0.0-py313.patch new file mode 100644 index 000000000000..5b9655b82716 --- /dev/null +++ b/dev-python/cloudpickle/files/cloudpickle-3.0.0-py313.patch @@ -0,0 +1,32 @@ +From 3dc53183e86bb9f0ee9d45ff9d4971036c61ecba Mon Sep 17 00:00:00 2001 +From: Lumir Balhar <lbalhar@redhat.com> +Date: Wed, 15 May 2024 10:43:50 +0200 +Subject: [PATCH] Fix test_extract_class_dict for Python 3.13 beta 1 + +Resolves: https://github.com/cloudpipe/cloudpickle/issues/533 +Closes: https://github.com/cloudpipe/cloudpickle/pull/534 +--- + tests/cloudpickle_test.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tests/cloudpickle_test.py b/tests/cloudpickle_test.py +index 4041bf7..6d0d915 100644 +--- a/tests/cloudpickle_test.py ++++ b/tests/cloudpickle_test.py +@@ -108,7 +108,12 @@ def test_extract_class_dict(): + return "c" + + clsdict = _extract_class_dict(C) +- assert sorted(clsdict.keys()) == ["C_CONSTANT", "__doc__", "method_c"] ++ expected_keys = ["C_CONSTANT", "__doc__", "method_c"] ++ # New attribute in Python 3.13 beta 1 ++ # https://github.com/python/cpython/pull/118475 ++ if sys.version_info >= (3, 13): ++ expected_keys.insert(2, "__firstlineno__") ++ assert sorted(clsdict.keys()) == expected_keys + assert clsdict["C_CONSTANT"] == 43 + assert clsdict["__doc__"] is None + assert clsdict["method_c"](C()) == C().method_c() +-- +2.45.2 + |