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.
This commit is contained in:
Kirill Podoprigora 2024-04-19 18:38:13 +03:00 committed by GitHub
parent 1e3e7ce11e
commit 8d4a244f15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -159,9 +159,8 @@ def requires_singlephase_init(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)