diff options
| author | Michał Górny <mgorny@gentoo.org> | 2023-11-05 17:33:17 +0100 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2023-11-05 18:00:08 +0100 |
| commit | 39f8dd1c48c3cbf2614027426754752df686fec8 (patch) | |
| tree | 8205d0e703b3f1ee6effea9d799d8b97074ebddd /dev-python | |
| parent | 634c55be919523a7da814c4dd1dfdcc8ab2f1994 (diff) | |
| download | gentoo-39f8dd1c48c3cbf2614027426754752df686fec8.tar.gz gentoo-39f8dd1c48c3cbf2614027426754752df686fec8.tar.bz2 gentoo-39f8dd1c48c3cbf2614027426754752df686fec8.zip | |
dev-python/py-ubjson: Enable py3.12
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/py-ubjson/files/py-ubjson-0.16.1-py312.patch | 35 | ||||
| -rw-r--r-- | dev-python/py-ubjson/py-ubjson-0.16.1-r1.ebuild | 7 |
2 files changed, 41 insertions, 1 deletions
diff --git a/dev-python/py-ubjson/files/py-ubjson-0.16.1-py312.patch b/dev-python/py-ubjson/files/py-ubjson-0.16.1-py312.patch new file mode 100644 index 000000000000..ab2bb2cab503 --- /dev/null +++ b/dev-python/py-ubjson/files/py-ubjson-0.16.1-py312.patch @@ -0,0 +1,35 @@ +From 1e69041e86947e360f30b8ee5ee0993ddd68469c Mon Sep 17 00:00:00 2001 +From: Vilnis Termanis <vilnis.termanis@iotics.com> +Date: Fri, 20 Oct 2023 17:10:10 +0200 +Subject: [PATCH] Fix recursion test case for Python 3.12 + +--- + test/test.py | 6 +++--- + 3 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/test/test.py b/test/test.py +index c3920c4..d685194 100644 +--- a/test/test.py ++++ b/test/test.py +@@ -465,10 +465,10 @@ def assert_raises_regex(self, *args, **kwargs): + + def test_recursion(self): + old_limit = getrecursionlimit() +- setrecursionlimit(200) ++ setrecursionlimit(100) + try: + obj = current = [] +- for _ in range(getrecursionlimit() * 2): ++ for _ in range(getrecursionlimit() * 30): + new_list = [] + current.append(new_list) + current = new_list +@@ -476,7 +476,7 @@ def test_recursion(self): + with self.assert_raises_regex(RuntimeError, 'recursion'): + self.ubjdumpb(obj) + +- raw = ARRAY_START * (getrecursionlimit() * 2) ++ raw = ARRAY_START * (getrecursionlimit() * 30) + with self.assert_raises_regex(RuntimeError, 'recursion'): + self.ubjloadb(raw) + finally: diff --git a/dev-python/py-ubjson/py-ubjson-0.16.1-r1.ebuild b/dev-python/py-ubjson/py-ubjson-0.16.1-r1.ebuild index e378a5cd0702..d04531f7b07d 100644 --- a/dev-python/py-ubjson/py-ubjson-0.16.1-r1.ebuild +++ b/dev-python/py-ubjson/py-ubjson-0.16.1-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=setuptools PYPI_NO_NORMALIZE=1 -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 pypi @@ -22,6 +22,11 @@ KEYWORDS="amd64 arm arm64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux" distutils_enable_tests unittest +PATCHES=( + # https://github.com/Iotic-Labs/py-ubjson/pull/19 + "${FILESDIR}/${P}-py312.patch" +) + python_test() { eunittest -s test } |
