Skip to content

Commit a7f9647

Browse files
mpageSonicField
authored andcommitted
pythongh-118433: Temporarily skip test_interrupt_main_subthread in free-threaded builds (python#118485)
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 pythongh-118433 for more details.
1 parent 008b4bd commit a7f9647

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_threading.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
import test.support
6-
from test.support import threading_helper, requires_subprocess
6+
from test.support import threading_helper, requires_subprocess, requires_gil_enabled
77
from test.support import verbose, cpython_only, os_helper
88
from test.support.import_helper import import_module
99
from test.support.script_helper import assert_python_ok, assert_python_failure
@@ -2025,6 +2025,7 @@ def check_interrupt_main_noerror(self, signum):
20252025
# Restore original handler
20262026
signal.signal(signum, handler)
20272027

2028+
@requires_gil_enabled("gh-118433: Flaky due to a longstanding bug")
20282029
def test_interrupt_main_subthread(self):
20292030
# Calling start_new_thread with a function that executes interrupt_main
20302031
# should raise KeyboardInterrupt upon completion.

0 commit comments

Comments
 (0)