-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
PEP 703 -- Making the Global Interpreter Lock Optional in CPython #108219
Copy link
Copy link
Closed
Closed
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement
Issue body actions
Feature or enhancement
The steering council has PEP 703. This is intended as a top-level issue to keep track of integration status.
The "up for grabs" list contains issues that no one is currently working on and are ready to be implemented. If you are interested in working on one of them, please comment on the specific issue and CC me (@colesbury) on related PRs.
### Up For Grabs (comment on specific issue to take)
### Linked issues
- [ ] https://github.com/python/cpython/issues/111506
- [ ] https://github.com/python/cpython/issues/111870
- [ ] https://github.com/python/cpython/issues/111924
- [ ] https://github.com/python/cpython/issues/112606
- [ ] https://github.com/python/cpython/issues/114203
- [ ] https://github.com/python/cpython/issues/114214
- [ ] https://github.com/python/cpython/issues/115999
- [ ] https://github.com/python/cpython/issues/116024
- [ ] https://github.com/python/cpython/issues/116738
- [ ] https://github.com/python/cpython/issues/117139
- [ ] https://github.com/python/cpython/issues/117721
- [ ] https://github.com/python/cpython/issues/117657
- [ ] https://github.com/python/cpython/issues/119053
Completed Issues
### Completed Issues
- [ ] https://github.com/python/cpython/issues/108223
- [ ] https://github.com/python/cpython/issues/108374
- [ ] https://github.com/python/cpython/issues/108337
- [ ] https://github.com/python/cpython/issues/108724
- [ ] https://github.com/python/cpython/issues/109549
- [ ] https://github.com/python/cpython/issues/109740
- [ ] https://github.com/python/cpython/issues/110119
- [ ] https://github.com/pypa/packaging/issues/727
- [ ] https://github.com/python/cpython/issues/111062
- [ ] https://github.com/python/cpython/issues/111569
- [ ] https://github.com/python/cpython/issues/112062
- [ ] https://github.com/python/cpython/issues/111903
- [ ] https://github.com/python/cpython/issues/111916
- [ ] https://github.com/python/cpython/issues/111928
- [ ] https://github.com/python/cpython/issues/112070
- [ ] https://github.com/python/cpython/issues/111956
- [ ] https://github.com/python/cpython/issues/111965
- [ ] https://github.com/python/cpython/issues/112213
- [ ] https://github.com/python/cpython/issues/112071
- [ ] https://github.com/python/cpython/issues/111972
- [ ] https://github.com/python/cpython/issues/112538
- [ ] https://github.com/python/cpython/issues/111962
- [ ] https://github.com/python/cpython/issues/112535
- [ ] https://github.com/python/cpython/issues/112205
- [ ] https://github.com/python/cpython/issues/111971
- [ ] https://github.com/python/cpython/issues/111650
- [ ] https://github.com/python/cpython/issues/113750
- [ ] https://github.com/python/cpython/issues/111964
- [ ] https://github.com/python/cpython/issues/113884
- [ ] https://github.com/python/cpython/issues/114569
- [ ] https://github.com/python/cpython/issues/114329
- [ ] https://github.com/python/cpython/issues/112066
- [ ] https://github.com/python/cpython/issues/110481
- [ ] https://github.com/python/cpython/issues/112532
- [ ] https://github.com/python/cpython/issues/112050
- [ ] https://github.com/python/cpython/issues/111968
- [ ] https://github.com/python/cpython/issues/115491
- [ ] https://github.com/python/cpython/issues/112175
- [ ] https://github.com/python/cpython/issues/113743
- [ ] https://github.com/python/cpython/issues/115103
- [ ] https://github.com/python/cpython/issues/112087
- [ ] https://github.com/python/cpython/issues/116616
- [ ] https://github.com/python/cpython/issues/116167
- [ ] https://github.com/python/cpython/issues/112536
- [ ] https://github.com/python/cpython/issues/116522
- [ ] https://github.com/python/cpython/issues/116664
- [ ] https://github.com/python/cpython/issues/117323
- [ ] https://github.com/python/cpython/issues/117300
- [ ] https://github.com/python/cpython/issues/111926
- [ ] https://github.com/python/cpython/issues/117293
- [ ] https://github.com/python/cpython/issues/117435
- [ ] https://github.com/python/cpython/issues/114271
- [ ] https://github.com/python/cpython/issues/112069
- [ ] https://github.com/python/cpython/issues/116329
- [ ] https://github.com/python/cpython/issues/116818
- [ ] https://github.com/python/cpython/issues/117514
- [ ] https://github.com/python/cpython/issues/112529
- [ ] https://github.com/python/cpython/issues/112075
- [ ] https://github.com/python/cpython/issues/116322
### Deferred tasks
- [ ] Revisit and update [`--disable-gil`](https://docs.python.org/dev/using/configure.html#cmdoption-disable-gil) configure documentation
- [x] Reenable test_cppext on `--disable-gil` builds
- [x] Audit usage of PyObject_Malloc for non-PyObject allocations
- [ ] Consider avoiding refcounting `tp_mro` during PyType_IsSubtype
Upstream functionality from nogil-3.12
This is a list of commits from the nogil-3.12 PR plan. The crossed-out entries are commits that do not need to be upstreamed, usually because the functionality is already in the main branch.
-
cefe5dfee9
configure: disallow "--with-trace-refs" for "--disable-gil" builds - Add support for thread sanitizer (TSAN) via
--with-thread-sanitizer
#112536) - Add a mechanism to disable the GIL #116167)
-
f30d8d8f50
Add pyatomic.h -
385eb1d99c
pyport: add new macros -
de2be447b3
Make PyThreadState_GET thread-local -
a24dc2ecc3
pystate: keep track of attached vs. detached state -
4584be5950
parking_lot: add mutexes and one-time notifications - Implement Python Critical Sections from PEP 703 #111569)
- Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization #111924)
- Move the
eval_breaker
toPyThreadState
#112175) -
b6b12a9a94
Implement biased reference counting - Implement biased reference counting in
--disable-gil
builds #110481) -
7b6b6f1a01
unicode: immortalize interned strings -
fc173e3711
unicode: always immortalize interned strings -
dd9b78460c
Add safe memory reclamation scheme based on FreeBSD's GUS -
901e134921
Add mimalloc v2.0.9 (DinoV) - mimalloc: additional integration and changes for
--disable-gil
builds #112532) - Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization #111924)
- Make the garbage collector thread-safe in
--disable-gil
builds #112529) - Make the garbage collector thread-safe in
--disable-gil
builds #112529) - Implement stop-the-world functionality (for
--disable-gil
builds) #111964) - Make the garbage collector thread-safe in
--disable-gil
builds #112529) - Use stop-the-world to make fork and interpreter shutdown thread-safe #116522)
- Make
sys.settrace
,sys.setprofile
, andsys.monitoring
thread safe in--disable-gil
builds #116818) - Use stop-the-world to make
sys._current_frames()
andsys._current_exceptions()
thread-safe in free-threaded build #117300) -
86efa7dfe3
pystate: implement _PyRuntime.multithreaded - Make
dict
objects thread-safe in--disable-gil
builds #112075) - Make
list
objects thread-safe in--disable-gil
builds #112087) - Make the MRO cache thread-safe in free-threaded builds #113743)
- Thread-safe one-time initialization #111956)
- Make weakref thread-safe without the GIL #111926)
- dtoa: thread safety in
--disable-gil
builds #111962) - unicode: make
_PyUnicode_FromId
thread-safe in--disable-gil
builds #111971) - unicode: make ucnhash_capi initialization thread-safe in
--disable-gil
builds #111972) - Make
_threadmodule.c
thread-safe in--disable-gil
builds #114271) -
cfc11bcb1a
typeobject: thread safety - Make
_threadmodule.c
thread-safe in--disable-gil
builds #114271) -
74df7785f5
pyqueue: add internal queue data structure - Add delayed reclamation mechanism for free-threaded build (QSBR) #115103)
- Make queue.SimpleQueue thread-safe in
--disable-gil
builds #113884) - Make
set
thread-safe in--disable-gil
builds #112069) -
3cfbc49229
moduleobject: fix data races - Make
_threadmodule.c
thread-safe in--disable-gil
builds #114271) -
31ec6f0290
pystate: refcount threads to handle race between interpreter shutdown and thread exit -
45bdd27ee5
threading: make _thread.lock thread-safe - Use per-thread freelists in
--disable-gil
builds #111968) -
ea1160c6d7
asyncio: fix race conditions in enter_task and leave_task - Use PyDict_GetItemRef() #111789)
- Thread-safe one-time initialization #111956)
- socketmodule.c: use atomics to access
defaulttimeout
in free-threaded build #116616) - Make
functools.lru_cache
thread-safe in--disable-gil
builds #112070) - Make
random.Random
thread-safe in--disable-gil
builds #112071) - Argument Clinic: Add support for PEP 703's critical sections (
Py_BEGIN_CRITICAL_SECTION()
) #111903) - Use critical sections to protect I/O objects (in
--disable-gil
builds) #111965) - Use critical sections to protect I/O objects (in
--disable-gil
builds) #111965) - Use critical sections to protect I/O objects (in
--disable-gil
builds) #111965) - Make collections.deque thread-safe in
--disable-gil
builds #112050) -
78825e0508
importlib: fix data race in imports (PyImport_ImportModuleLevelObject) - Make multiprocessing
SemLock
thread-safe in the free-threaded build #117435) - Make hashlib related modules thread-safe without the GIL #111916)
- Make
_struct
module thread-safe in--disable-gil
builds #112062) -
0e0b3899d1
signalmodule: fix thread-safety issue on macOS (Unclear if this is still an issue on macOS) - json: make "memo" dict local to scan_once call #111928)
-
86e7772c64
http: fix dependency on finalization order -
9ab96964e7
faulthandler: don't dump all threads when running without the GIL -
cff32694a4
test_gdb: skip test_threads when running without GIL -
2ae5ee5ed4
tests: fix and work around some race conditions in tests -
9f9b3d085f
ceval: fix some thread-safety issues - Use per-thread freelists in
--disable-gil
builds #111968) -
149ea9dc43
Deferred reference counting -
7e7568672d
specialize: make specialization thread-safe -
90d34f0d18
specialize: optimize for single-threaded programs -
42d3e11d8c
code: make code object use deferred reference counting -
c9fc49666c
test: add support for checking for TSAN -
7507a77a98
thread: don't use sem_clockwait with TSAN -
a62d37674c
_posixsubprocess: disable vfork when running with ASAN -
398204d57b
object: fix reported TSAN races - Disable the GIL by default in free-threaded builds #116329)
Linked PRs
jiangying000, vigneshmanick, Superskyyy, FeldrinH, vitor-alves and 4 moreJelleZijlstra, Eclips4, AA-Turner, AlexWaygood, Gobot1234 and 46 morestonebig, jeanCarloMachado, kkonghao, Eclips4, GuilhermeDeconto and 9 moreitamaro, Eclips4, AA-Turner, AlexWaygood, furkanonder and 29 more
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
Issue actions