]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (GH-119140) (#119143)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 18 May 2024 13:46:21 +0000 (15:46 +0200)
committerGitHub <noreply@github.com>
Sat, 18 May 2024 13:46:21 +0000 (13:46 +0000)
gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (GH-119140)
(cherry picked from commit 74072a3ffc733e32159e694bcf7a2198f2db0d43)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/pythoninfo.py

index 1db9fb9537f888f09b1295d1eb25c9b23fa45363..d928e002ebda109739181b9b0ab44fc41faae485 100644 (file)
@@ -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'):