Skip to content

Commit 5afe0c1

Browse files
authored
gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)
Enable with --disable-gil --without-pydebug: $ make pythoninfo|grep NOGIL sysconfig[Py_NOGIL]: 1 $ ./python -m test ... == Python build: nogil debug ...
1 parent d63972e commit 5afe0c1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Lib/test/libregrtest/utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ def get_build_info():
228228
ldflags_nodist = sysconfig.get_config_var('PY_LDFLAGS_NODIST') or ''
229229

230230
build = []
231+
232+
# --disable-gil
233+
if sysconfig.get_config_var('Py_NOGIL'):
234+
build.append("nogil")
235+
231236
if hasattr(sys, 'gettotalrefcount'):
232237
# --with-pydebug
233238
build.append('debug')

Lib/test/pythoninfo.py

+1
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ def collect_sysconfig(info_add):
492492
'PY_STDMODULE_CFLAGS',
493493
'Py_DEBUG',
494494
'Py_ENABLE_SHARED',
495+
'Py_NOGIL',
495496
'SHELL',
496497
'SOABI',
497498
'prefix',

0 commit comments

Comments
 (0)