Skip to content

Commit

Permalink
gh-118079: Fix requires_singlephase_init helper (#118081)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Eclips4 authored Apr 19, 2024
1 parent 1e3e7ce commit 8d4a244
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ def meth(self, _meth=meth):
finally:
restore__testsinglephase()
meth = cpython_only(meth)
# gh-117649: free-threaded build does not currently support single-phase
# init modules in subinterpreters.
meth = requires_gil_enabled(meth)
msg = "gh-117694: free-threaded build does not currently support single-phase init modules in sub-interpreters"
meth = requires_gil_enabled(msg)(meth)
return unittest.skipIf(_testsinglephase is None,
'test requires _testsinglephase module')(meth)

Expand Down

0 comments on commit 8d4a244

Please sign in to comment.