summaryrefslogtreecommitdiff
path: root/dev-python/py-ubjson
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-11-05 17:56:40 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-11-05 17:56:40 +0000
commit8e2a024866693650b07dbc2f43e4be74952feb05 (patch)
tree8add0aed8397d3bb7b1ea141fecaf043ce74aadd /dev-python/py-ubjson
parent1e1ad59bb4d445add435d8a12ae5338f96ad605e (diff)
downloadbaldeagleos-repo-8e2a024866693650b07dbc2f43e4be74952feb05.tar.gz
baldeagleos-repo-8e2a024866693650b07dbc2f43e4be74952feb05.tar.xz
baldeagleos-repo-8e2a024866693650b07dbc2f43e4be74952feb05.zip
Adding metadata
Diffstat (limited to 'dev-python/py-ubjson')
-rw-r--r--dev-python/py-ubjson/files/py-ubjson-0.16.1-py312.patch35
-rw-r--r--dev-python/py-ubjson/py-ubjson-0.16.1-r1.ebuild5
2 files changed, 40 insertions, 0 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 a0137b18e747..1e223a81e050 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
@@ -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
}