diff options
author | Victor Stinner <vstinner@python.org> | 2024-05-18 13:24:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-18 13:24:22 (GMT) |
commit | 74072a3ffc733e32159e694bcf7a2198f2db0d43 (patch) | |
tree | dc2eb80b6f39501315911a642624582708bb312e | |
parent | 0f5e8bed636c2f29701e5a1965d1b088d33abbf0 (diff) | |
download | cpython-74072a3ffc733e32159e694bcf7a2198f2db0d43.zip cpython-74072a3ffc733e32159e694bcf7a2198f2db0d43.tar.gz cpython-74072a3ffc733e32159e694bcf7a2198f2db0d43.tar.bz2 |
gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (#119140)
-rw-r--r-- | Lib/test/pythoninfo.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 1db9fb9..d928e00 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'): |