Skip to content

Commit 8d4a244

Browse files
authored
gh-118079: Fix requires_singlephase_init helper (#118081)
Before this PR tests decorated with a `requires_singlephase_init` helper did not run because of an incorrect call to the `requires_gil_enabled` helper.
1 parent 1e3e7ce commit 8d4a244

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_import/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ def meth(self, _meth=meth):
159159
finally:
160160
restore__testsinglephase()
161161
meth = cpython_only(meth)
162-
# gh-117649: free-threaded build does not currently support single-phase
163-
# init modules in subinterpreters.
164-
meth = requires_gil_enabled(meth)
162+
msg = "gh-117694: free-threaded build does not currently support single-phase init modules in sub-interpreters"
163+
meth = requires_gil_enabled(msg)(meth)
165164
return unittest.skipIf(_testsinglephase is None,
166165
'test requires _testsinglephase module')(meth)
167166

0 commit comments

Comments
 (0)