summaryrefslogtreecommitdiff
path: root/dev-python/tblib
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/tblib')
-rw-r--r--dev-python/tblib/Manifest3
-rw-r--r--dev-python/tblib/files/tblib-3.0.0-test.patch35
-rw-r--r--dev-python/tblib/tblib-3.0.0.ebuild9
3 files changed, 44 insertions, 3 deletions
diff --git a/dev-python/tblib/Manifest b/dev-python/tblib/Manifest
index 02d1a7186558..0fe730e151dd 100644
--- a/dev-python/tblib/Manifest
+++ b/dev-python/tblib/Manifest
@@ -1,3 +1,4 @@
+AUX tblib-3.0.0-test.patch 1454 BLAKE2B 931f5f88d29157a78dbecf4cdfa3bde687ec4120d1b3aaa5b0b46374ecac8ff0ec10fbfacaf12b2228ae821536e79ce98f458fa510fb4ba71cadbf84e2a6c781 SHA512 129d494eaee675a50bef8e7cc2de0fb1b7708cf95b85167c81718b79d9da5fef046e90e17a511f126ee14d32035e93f14f0f6d5f20f3ee6a324c8fadeab028ae
DIST tblib-3.0.0.tar.gz 30616 BLAKE2B 4e2ea0e0f09894f1a8dee4d0dbdc61c054964e4ec5a8a1fbb31f3793268ab8607b5b6e547f7771264c9863522b01cdd39ef6aa4a91d757f1c37f9fac37d6cbaf SHA512 9914709846a4a9b0d9fe0f58eb321085f69e11ce364930f67cc5fec008d6ca57963b17699b0a136e2de91ff01004275fc43a38f318b9faab7cb2fac861108297
-EBUILD tblib-3.0.0.ebuild 709 BLAKE2B 1808c1cae890728c8012f2dd653b1e1f808faf8ced593e5f95c4d9f1b0da1acbed3e78e8fcf3294c9d87b672c40e9136d331a5db839ce8d23c9db8b5b16cf40f SHA512 f19eed1c81dd7b75d680a8f6165ee0c9fe7a3bde112b36e4fde39bde2e96499d0b84009a2741be2be014c453970881616487c1a1691410dc106b3b297dc686d5
+EBUILD tblib-3.0.0.ebuild 835 BLAKE2B af55166728e6b50190a21d42cc8161e685d6d1cf4844ad5afc0fbe4b712545bb261178e2587b29d99f26c93d7c3a9fb3ae50ba343f0ccb14120f7fc767e5bc3f SHA512 cfe4bd2f1b83a0961ef29d04886e7cfb50eaf5777aef069f64b9c51f2d5ada34dfacb1f682c49f6cb53656bc2baf6866619b87f13e9244d75ba1ba32f4166023
MISC metadata.xml 406 BLAKE2B 196dcfaca9d242ddf68db2f831720a877f9aa1ec0f1d8aefb4d20f03a8399370ac62e5c009b1538c7f20512bc17ca23c5286544081a8f15512a95e1b4c754e9e SHA512 0e82fd782c7532e0f1877aea67c3171847469f7c0669664b8d9b1a22bdeca9daf6f6159f202041d3f1d83c3bd9871ee084564df0e7b64c8c2230d8b5aba2a91f
diff --git a/dev-python/tblib/files/tblib-3.0.0-test.patch b/dev-python/tblib/files/tblib-3.0.0-test.patch
new file mode 100644
index 000000000000..fb1aed1344d5
--- /dev/null
+++ b/dev-python/tblib/files/tblib-3.0.0-test.patch
@@ -0,0 +1,35 @@
+diff --git a/tests/test_pickle_exception.py b/tests/test_pickle_exception.py
+index 5ff4679..53a9dce 100644
+--- a/tests/test_pickle_exception.py
++++ b/tests/test_pickle_exception.py
+@@ -29,6 +29,10 @@ class CustomError(Exception):
+ pass
+
+
++def strip_locations(tb_text):
++ return tb_text.replace(' ~~^~~\n', '').replace(' ^^^^^^^^^^^^^^^^^\n', '')
++
++
+ @pytest.mark.parametrize('protocol', [None, *list(range(1, pickle.HIGHEST_PROTOCOL + 1))])
+ @pytest.mark.parametrize('how', ['global', 'instance', 'class'])
+ def test_install(clear_dispatch_table, how, protocol):
+@@ -58,8 +62,8 @@ def test_install(clear_dispatch_table, how, protocol):
+ else:
+ raise AssertionError
+
+- expected_format_exception = ''.join(format_exception(type(exc), exc, exc.__traceback__))
+- print(expected_format_exception)
++ expected_format_exception = strip_locations(''.join(format_exception(type(exc), exc, exc.__traceback__)))
++
+ # Populate Exception.__dict__, which is used in some cases
+ exc.x = 1
+ exc.__cause__.x = 2
+@@ -88,7 +92,7 @@ def test_install(clear_dispatch_table, how, protocol):
+ if has_python311:
+ assert exc.__notes__ == ['note 1', 'note 2']
+
+- assert expected_format_exception == ''.join(format_exception(type(exc), exc, exc.__traceback__))
++ assert expected_format_exception == strip_locations(''.join(format_exception(type(exc), exc, exc.__traceback__)))
+
+
+ @tblib.pickling_support.install
diff --git a/dev-python/tblib/tblib-3.0.0.ebuild b/dev-python/tblib/tblib-3.0.0.ebuild
index a16181b168e7..ce963787db28 100644
--- a/dev-python/tblib/tblib-3.0.0.ebuild
+++ b/dev-python/tblib/tblib-3.0.0.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
inherit distutils-r1 pypi
@@ -29,6 +29,11 @@ BDEPEND="
distutils_enable_tests pytest
+PATCHES=(
+ # combined fixes from https://github.com/ionelmc/python-tblib/issues/74
+ "${FILESDIR}/${P}-test.patch"
+)
+
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local -x PYTHONNODEBUGRANGES=yes