File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change 3
3
# for complete details.
4
4
5
5
import contextlib
6
- import sys
7
- import sysconfig
8
6
9
7
import pytest
10
8
@@ -68,20 +66,3 @@ def test(self):
68
66
yield
69
67
except pytest .skip .Exception :
70
68
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 )
You can’t perform that action at this time.
0 commit comments