-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Set sys.abiflags on Windows #127405
Copy link
Copy link
Closed
Labels
OS-windowsbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sysconfigtype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
OS-windowsbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sysconfigtype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
Proposal:
Currently, the
sys.abiflagsattribute is only set on Unix systems. On Windows, there are nosys.abiflagsset (i.e.hasattr(sys, 'abiflags') -> False). It is hard to tell if Python is in free-threaded or debug builds. Although developers can use something likesysconfig.get_config_var('Py_GIL_DISABLED'). It is not well documented and is not convenient.cpython/Lib/test/test_sys.py
Lines 686 to 687 in 3afb639
cpython/Lib/test/test_sys.py
Lines 1294 to 1297 in 3afb639
It would be nice if we could set
ABIFLAGSinpyconfig.hand enablesys.abiflagson Windows. This would simplify much code in the wild world and also in the CPython repo.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
sys.abiflagson Windows #127406sys.abiflagsavailability on Windows #131717ABIFLAGStosysconfig.get_config_vars()on Windows #131799sysconfig._get_pybuilddir()#131935