We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sys._is_gil_enabled()
1 parent cefaed9 commit 63044a0Copy full SHA for 63044a0
tests/conftest.py
@@ -1,6 +1,6 @@
1
from __future__ import annotations
2
3
-import sysconfig
+import sys
4
import typing as t
5
from types import ModuleType
6
@@ -17,7 +17,9 @@
17
18
def pytest_report_header() -> list[str]:
19
"""Return a list of strings to be displayed in the header of the report."""
20
- return [f"Free-threaded: {bool(sysconfig.get_config_var('Py_GIL_DISABLED'))}"]
+ if sys.version_info < (3, 13):
21
+ return []
22
+ return [f"Free-threaded: {sys._is_gil_enabled()}"]
23
24
25
@pytest.fixture(
0 commit comments