diff --git a/longer-time-test_thread_time.patch b/longer-time-test_thread_time.patch new file mode 100644 index 0000000..48025a2 --- /dev/null +++ b/longer-time-test_thread_time.patch @@ -0,0 +1,29 @@ +From 6c6636477245f87b200f2f2c5a9043ee1d69842e Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Thu, 8 Jan 2026 13:18:50 +0100 +Subject: [PATCH] gh-143528: Fix test_time.test_thread_time() + +Tolerate 100 ms instead of 20 ms to support slow CIs. +--- + Lib/test/test_time.py | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +Index: Python-3.15.0a3/Lib/test/test_time.py +=================================================================== +--- Python-3.15.0a3.orig/Lib/test/test_time.py 2026-01-09 11:44:20.543009433 +0100 ++++ Python-3.15.0a3/Lib/test/test_time.py 2026-01-09 11:44:27.380993477 +0100 +@@ -580,11 +580,10 @@ + + # thread_time() should not include time spend during a sleep + start = time.thread_time() +- time.sleep(0.100) ++ time.sleep(0.200) + stop = time.thread_time() +- # use 20 ms because thread_time() has usually a resolution of 15 ms +- # on Windows +- self.assertLess(stop - start, 0.020) ++ # gh-143528: use 100 ms to support slow CI ++ self.assertLess(stop - start, 0.100) + + info = time.get_clock_info('thread_time') + self.assertTrue(info.monotonic) diff --git a/python315.changes b/python315.changes index 1f08f68..52b90c2 100644 --- a/python315.changes +++ b/python315.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jan 9 10:41:47 UTC 2026 - Matej Cepl + +- Rename skip-test_thread_time.patch to + longer-time-test_thread_time.patch and replace its content with + gh#python/cpython!143558 + ------------------------------------------------------------------- Wed Jan 7 17:12:05 UTC 2026 - Matej Cepl diff --git a/python315.spec b/python315.spec index c870f10..4513ef5 100644 --- a/python315.spec +++ b/python315.spec @@ -224,9 +224,9 @@ Patch40: fix-test-recursion-limit-15.6.patch Patch41: bsc1243155-sphinx-non-determinism.patch # PATCH-FIX-OPENSUSE gh139257-Support-docutils-0.22.patch gh#python/cpython#139257 daniel.garcia@suse.com Patch42: gh139257-Support-docutils-0.22.patch -# PATCH-FIX-UPSTREAM skip-test_thread_time.patch gh#python/cpython#143528 mcepl@suse.com -# skip test.test_time.TimeTestCase.test_thread_time on s390x -Patch43: skip-test_thread_time.patch +# PATCH-FIX-UPSTREAM longer-time-test_thread_time.patch gh#python/cpython!143558 mcepl@suse.com +# tolerate 100 ms instead of 20 ms to support slow CIs. +Patch43: longer-time-test_thread_time.patch #### Python 3.15 DEVELOPMENT PATCHES BuildRequires: autoconf-archive BuildRequires: automake diff --git a/skip-test_thread_time.patch b/skip-test_thread_time.patch deleted file mode 100644 index 3dd73fd..0000000 --- a/skip-test_thread_time.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- - Lib/test/test_time.py | 1 + - 1 file changed, 1 insertion(+) - -Index: Python-3.15.0a3/Lib/test/test_time.py -=================================================================== ---- Python-3.15.0a3.orig/Lib/test/test_time.py 2026-01-06 16:57:59.278632516 +0100 -+++ Python-3.15.0a3/Lib/test/test_time.py 2026-01-07 18:10:25.621075073 +0100 -@@ -570,6 +570,7 @@ - self.assertTrue(info.monotonic) - self.assertFalse(info.adjustable) - -+ @unittest.skipIf(platform.processor() == 's390x', "Fails on s390x, gh#python/cpython#143528") - def test_thread_time(self): - if not hasattr(time, 'thread_time'): - if sys.platform.startswith(('linux', 'android', 'win')):