]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118079: Fix ``requires_singlephase_init`` helper (#118081)
authorKirill Podoprigora <kirill.bast9@mail.ru>
Fri, 19 Apr 2024 15:38:13 +0000 (18:38 +0300)
committerGitHub <noreply@github.com>
Fri, 19 Apr 2024 15:38:13 +0000 (11:38 -0400)
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.

Lib/test/test_import/__init__.py

index 4726619b08edc4fb8a53d4fceb7873736e376566..469d1fbe59aaa2d8ec9f360903a9727850b874ea 100644 (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)