Skip to content

Commit 4df182e

Browse files
committed
Fix testsuite on Python 3.10
python/cpython#20263
1 parent 10356af commit 4df182e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/python/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
# to the event loop in the testsuite class, because
2222
# SyncTrioEventLoop spawns a thread that only exits when the
2323
# loop is closed. Nerf it.
24-
from test.support import threading_cleanup
24+
try:
25+
from test.support import threading_cleanup
26+
except ImportError:
27+
# Python 3.10+
28+
from test.support.threading_helper import threading_cleanup
2529

2630
def threading_no_cleanup(*original_values):
2731
pass

0 commit comments

Comments
 (0)