[packages/python3/PYTHON_3_13] - adjust test_array to avoid failures with some installed modules

qboosh qboosh at pld-linux.org
Sun Nov 29 12:08:07 CET 2026


commit dd3b3c08d5aa4e120539eeb5b8d40362ff32e076
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 29 12:08:13 2026 +0100

    - adjust test_array to avoid failures with some installed modules

 python3-test-array.patch | 12 ++++++++++++
 python3.spec             | 24 ++++++++++++------------
 2 files changed, 24 insertions(+), 12 deletions(-)
---
diff --git a/python3.spec b/python3.spec
index 1d48887..bdf5170 100644
--- a/python3.spec
+++ b/python3.spec
@@ -66,7 +66,7 @@ Patch4:		%{name}-BLDLIBRARY.patch
 Patch5:		%{name}-config.patch
 
 Patch9:		%{name}-tests_with_pythonpath.patch
-
+Patch10:	%{name}-test-array.patch
 Patch11:	%{name}-installcompile.patch
 
 Patch14:	python3-profile-tests.patch
@@ -475,19 +475,19 @@ Moduły testowe dla Pythona.
 %prep
 %setup -q -n Python-%{version}
 
-%patch -P 2 -p1
-%patch -P 3 -p1
-%patch -P 4 -p1
-%patch -P 5 -p1
-
-%patch -P 9 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
 
-%patch -P 11 -p1
+%patch -P9 -p1
+%patch -P10 -p1
+%patch -P11 -p1
 
-%patch -P 14 -p1
-%patch -P 15 -p1
-%patch -P 16 -p1
-%patch -P 17 -p1
+%patch -P14 -p1
+%patch -P15 -p1
+%patch -P16 -p1
+%patch -P17 -p1
 
 %{__rm} -r Modules/expat
 
diff --git a/python3-test-array.patch b/python3-test-array.patch
new file mode 100644
index 0000000..812030c
--- /dev/null
+++ b/python3-test-array.patch
@@ -0,0 +1,12 @@
+Make the test resistant to installed modules, which could load array from e.g. pth files
+--- Python-3.13.18/Lib/test/test_array.py.orig	2026-10-25 19:31:23.000000000 +0100
++++ Python-3.13.18/Lib/test/test_array.py	2026-11-29 10:15:32.923350809 +0100
+@@ -65,7 +65,7 @@ class MiscTest(unittest.TestCase):
+             else:
+                 raise AssertionError('AttributeError was not raised')
+         """
+-        script_helper.assert_python_ok('-c', code)
++        script_helper.assert_python_ok('-S', '-c', code)
+ 
+     @support.cpython_only
+     def test_disallow_instantiation(self):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3.git/commitdiff/dd3b3c08d5aa4e120539eeb5b8d40362ff32e076



More information about the pld-cvs-commit mailing list