]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118433: Temporarily skip `test_interrupt_main_subthread` in free-threaded builds...
authormpage <mpage@meta.com>
Wed, 1 May 2024 20:59:12 +0000 (13:59 -0700)
committerGitHub <noreply@github.com>
Wed, 1 May 2024 20:59:12 +0000 (20:59 +0000)
Free-threaded builds can intermittently tickle a longstanding bug (24 years!)
in the implementation of `threading.Condition`, leading to flakiness in the
test suite. Fixing the underlying issue will require more discussion, and will
likely apply to most of the concurrency primitives in the `threading` module
that are written in Python. See gh-118433 for more details.

Lib/test/test_threading.py

index 362a3f9c4a01d12a3ba92b771d8590829c0022f8..0047e8a8798d4e03b1a71be3418c17be4b685689 100644 (file)
@@ -3,7 +3,7 @@ Tests for the threading module.
 """
 
 import test.support
-from test.support import threading_helper, requires_subprocess
+from test.support import threading_helper, requires_subprocess, requires_gil_enabled
 from test.support import verbose, cpython_only, os_helper
 from test.support.import_helper import import_module
 from test.support.script_helper import assert_python_ok, assert_python_failure
@@ -2025,6 +2025,7 @@ class InterruptMainTests(unittest.TestCase):
             # Restore original handler
             signal.signal(signum, handler)
 
+    @requires_gil_enabled("gh-118433: Flaky due to a longstanding bug")
     def test_interrupt_main_subthread(self):
         # Calling start_new_thread with a function that executes interrupt_main
         # should raise KeyboardInterrupt upon completion.