From: Victor Stinner Date: Sat, 18 May 2024 13:24:22 +0000 (-0400) Subject: gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (#119140) X-Git-Tag: v3.14.0a1~1883 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74072a3ffc733e32159e694bcf7a2198f2db0d43;p=thirdparty%2FPython%2Fcpython.git gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (#119140) --- diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 1db9fb9537f8..d928e002ebda 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -105,9 +105,13 @@ def collect_sys(info_add): ) copy_attributes(info_add, sys, 'sys.%s', attributes) - call_func(info_add, 'sys.androidapilevel', sys, 'getandroidapilevel') - call_func(info_add, 'sys.windowsversion', sys, 'getwindowsversion') - call_func(info_add, 'sys.getrecursionlimit', sys, 'getrecursionlimit') + for func in ( + '_is_gil_enabled', + 'getandroidapilevel', + 'getrecursionlimit', + 'getwindowsversion', + ): + call_func(info_add, f'sys.{func}', sys, func) encoding = sys.getfilesystemencoding() if hasattr(sys, 'getfilesystemencodeerrors'):