Skip to content

Commit c674208

Browse files
committed
revert the GIL-enabled conftest check
1 parent cf205ea commit c674208

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

tests/conftest.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# for complete details.
44

55
import contextlib
6-
import sys
7-
import sysconfig
86

97
import pytest
108

@@ -68,20 +66,3 @@ def test(self):
6866
yield
6967
except pytest.skip.Exception:
7068
pass
71-
72-
73-
FREE_THREADED_BUILD = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
74-
is_gil_enabled = getattr(sys, "_is_gil_enabled", lambda: True)
75-
gil_enabled_at_start = is_gil_enabled()
76-
77-
78-
def pytest_terminal_summary(terminalreporter, exitstatus, config):
79-
if FREE_THREADED_BUILD and not gil_enabled_at_start and is_gil_enabled():
80-
tr = terminalreporter
81-
tr.ensure_newline()
82-
tr.section("GIL re-enabled", sep="=", red=True, bold=True)
83-
tr.line("The GIL was re-enabled at runtime during the tests.")
84-
tr.line("Please ensure all new pymodules declare support for running")
85-
tr.line("without the GIL. Any new tests that intentionally imports ")
86-
tr.line("code that re-enables the GIL should do so in a subprocess.")
87-
pytest.exit("GIL re-enabled during tests", returncode=1)

0 commit comments

Comments
 (0)