Description
PEP 703 specifies that the Py_NOGIL
macro designates --disable-gil
builds. The steering council has written that they would "like a positive, clear term to talk about the no-GIL build".
I would prefer the steering council to decide on a replacement name (if any) because the community discussions have not reached any consensus about naming.
@hugovk has suggested a two possible replacement names:
Py_DISABLE_GIL
(which matches the--disable-gil
configure flag)Py_FREE_THREADED
@gvanrossum suggested (in a comment below):
Py_MULTICORE
(with a corresponding--enable-multicore
configure flag)
Whatever name is chosen will be used by C code as well as exposed through sysconfig
.
Note that labeling the default (with GIL) build with a macro like Py_GIL
or Py_WITH_GIL
would not work well because it would not be defined in older versions of Python, and that would make writing the #if
pre-processor guards more difficult for extensions that targets multiple versions of Python.
This is not super urgent, but it would be helpful to have a decision within the next few months before we start relying on the macro in C API extensions.
See also: