File tree 7 files changed +12
-9
lines changed
7 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,10 @@ General Options
292
292
.. option :: --disable-gil
293
293
294
294
Enables **experimental ** support for running Python without the
295
- :term: `global interpreter lock ` (GIL).
295
+ :term: `global interpreter lock ` (GIL): free threading build.
296
+
297
+ Define the ``Py_GIL_DISABLED `` macro and add ``"t" `` to
298
+ :data: `sys.abiflags `.
296
299
297
300
See :pep: `703 ` "Making the Global Interpreter Lock Optional in CPython".
298
301
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ def get_build_info():
291
291
292
292
# --disable-gil
293
293
if sysconfig .get_config_var ('Py_GIL_DISABLED' ):
294
- build .append ("nogil " )
294
+ build .append ("freethreading " )
295
295
296
296
if hasattr (sys , 'gettotalrefcount' ):
297
297
# --with-pydebug
Original file line number Diff line number Diff line change @@ -796,8 +796,8 @@ def check_cflags_pgo():
796
796
return any (option in cflags_nodist for option in pgo_options )
797
797
798
798
799
- Py_GIL_DISABLED = bool (sysconfig .get_config_var ('Py_GIL_DISABLED' ))
800
- if Py_GIL_DISABLED :
799
+ FREE_THREADING = bool (sysconfig .get_config_var ('Py_GIL_DISABLED' ))
800
+ if FREE_THREADING :
801
801
_header = 'PHBBInP'
802
802
else :
803
803
_header = 'nP'
Original file line number Diff line number Diff line change @@ -2854,7 +2854,7 @@ def testfunc(n, m):
2854
2854
self .assertIn ("_FOR_ITER_TIER_TWO" , uops )
2855
2855
2856
2856
2857
- @unittest .skipUnless (support .Py_GIL_DISABLED , 'need Py_GIL_DISABLED ' )
2857
+ @unittest .skipUnless (support .FREE_THREADING , 'need free threading ' )
2858
2858
class TestPyThreadId (unittest .TestCase ):
2859
2859
def test_py_thread_id (self ):
2860
2860
# gh-112535: Test _Py_ThreadId(): make sure that thread identifiers
Original file line number Diff line number Diff line change 14
14
15
15
# gh-110119: pip does not currently support 't' in the ABI flag use by
16
16
# --disable-gil builds. Once it does, we can remove this skip.
17
- @unittest .skipIf (support .Py_GIL_DISABLED ,
18
- 'test does not work with --disable-gil ' )
17
+ @unittest .skipIf (support .FREE_THREADING ,
18
+ 'test does not work with free threading ' )
19
19
@support .requires_subprocess ()
20
20
class TestCPPExt (unittest .TestCase ):
21
21
@support .requires_resource ('cpu' )
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def test_module_not_found(self):
112
112
class WindowsExtensionSuffixTests :
113
113
def test_tagged_suffix (self ):
114
114
suffixes = self .machinery .EXTENSION_SUFFIXES
115
- abi_flags = "t" if support .Py_GIL_DISABLED else ""
115
+ abi_flags = "t" if support .FREE_THREADING else ""
116
116
ver = sys .version_info
117
117
platform = re .sub ('[^a-zA-Z0-9]' , '_' , get_platform ())
118
118
expected_tag = f".cp{ ver .major } { ver .minor } { abi_flags } -{ platform } .pyd"
Original file line number Diff line number Diff line change @@ -1224,7 +1224,7 @@ def test_pystats(self):
1224
1224
@test .support .cpython_only
1225
1225
@unittest .skipUnless (hasattr (sys , 'abiflags' ), 'need sys.abiflags' )
1226
1226
def test_disable_gil_abi (self ):
1227
- self .assertEqual ('t' in sys .abiflags , support .Py_GIL_DISABLED )
1227
+ self .assertEqual ('t' in sys .abiflags , support .FREE_THREADING )
1228
1228
1229
1229
1230
1230
@test .support .cpython_only
You can’t perform that action at this time.
0 commit comments