summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2024-04-19 15:38:13 (GMT)
committerGitHub <noreply@github.com>2024-04-19 15:38:13 (GMT)
commit8d4a244f1516dcde23becc2a273d30c202237598 (patch)
tree0638a746c6bcbe9b018dfd85a2f51aaa3e42a5f7
parent1e3e7ce11e3b0fc76e981db85d27019d6d210bbc (diff)
downloadcpython-8d4a244f1516dcde23becc2a273d30c202237598.zip
cpython-8d4a244f1516dcde23becc2a273d30c202237598.tar.gz
cpython-8d4a244f1516dcde23becc2a273d30c202237598.tar.bz2
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.
-rw-r--r--Lib/test/test_import/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index 4726619..469d1fb 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -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)