From a9040124361aab60fbba11f45f58d75cd4a45c13 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 18 May 2024 07:24:05 -0400 Subject: [PATCH 1/2] gh-119132: Log sys._is_gil_disabled() in test.pythoninfo --- Lib/test/pythoninfo.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 1db9fb9537f888..a058c8c1a5d66a 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_disabled', + 'getandroidapilevel', + 'getrecursionlimit', + 'getwindowsversion', + ): + call_func(info_add, f'sys.{func}', sys, func) encoding = sys.getfilesystemencoding() if hasattr(sys, 'getfilesystemencodeerrors'): From 5980f0e4de32416f8dcb6651c396b57ece04ffda Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 18 May 2024 07:37:12 -0400 Subject: [PATCH 2/2] Fix function name --- Lib/test/pythoninfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index a058c8c1a5d66a..d928e002ebda10 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -106,7 +106,7 @@ def collect_sys(info_add): copy_attributes(info_add, sys, 'sys.%s', attributes) for func in ( - '_is_gil_disabled', + '_is_gil_enabled', 'getandroidapilevel', 'getrecursionlimit', 'getwindowsversion', pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy