Skip to content

Commit

Permalink
pythongh-108223: test.pythoninfo and libregrtest log Py_NOGIL (python…
Browse files Browse the repository at this point in the history
…#108238)

Enable with --disable-gil --without-pydebug:

    $ make pythoninfo|grep NOGIL
    sysconfig[Py_NOGIL]: 1

    $ ./python -m test
    ...
    == Python build: nogil debug
    ...

(cherry picked from commit 5afe0c1)
  • Loading branch information
vstinner committed Sep 2, 2023
1 parent f848b2b commit 15425da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Lib/test/libregrtest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ def get_build_info():
ldflags_nodist = sysconfig.get_config_var('PY_LDFLAGS_NODIST') or ''

build = []

# --disable-gil
if sysconfig.get_config_var('Py_NOGIL'):
build.append("nogil")

if hasattr(sys, 'gettotalrefcount'):
# --with-pydebug
build.append('debug')
Expand Down
1 change: 1 addition & 0 deletions Lib/test/pythoninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ def collect_sysconfig(info_add):
'PY_STDMODULE_CFLAGS',
'Py_DEBUG',
'Py_ENABLE_SHARED',
'Py_NOGIL',
'SHELL',
'SOABI',
'prefix',
Expand Down

0 comments on commit 15425da

Please sign in to comment.