-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
3.13bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
The steering council has accepted 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.
-
cefe5dfee9configure: disallow "--with-trace-refs" for "--disable-gil" builds -
dcddbe2ddbconfigure: add support for --with-thread-sanitizer (Add support for thread sanitizer (TSAN) via--with-thread-sanitizer#112536) -
f546dbf16aEnable/disable the GIL at runtime (Add a mechanism to disable the GIL #116167) -
f30d8d8f50Add pyatomic.h -
385eb1d99cpyport: add new macros -
de2be447b3Make PyThreadState_GET thread-local -
a24dc2ecc3pystate: keep track of attached vs. detached state -
4584be5950parking_lot: add mutexes and one-time notifications -
6845b133cccritical_section: helpers for fine-grained locking (Implement Python Critical Sections from PEP 703 #111569) -
8ed62cab6apystate: use _PyRawMutex for internal mutexes (Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization #111924) -
e15443b1f2ceval: move eval_breaker to per-thread state (Move theeval_breakertoPyThreadState#112175) -
b6b12a9a94Implement biased reference counting -
b6b12a9a94Implement BRC inter-thread queue (Implement biased reference counting in--disable-gilbuilds #110481) -
7b6b6f1a01unicode: immortalize interned strings -
fc173e3711unicode: always immortalize interned strings -
dd9b78460cAdd safe memory reclamation scheme based on FreeBSD's GUS -
901e134921Add mimalloc v2.0.9 (DinoV) -
b6980856dfAdditional mimalloc changes (mimalloc: additional integration and changes for--disable-gilbuilds #112532) -
d13c63dee9pymem: remove uses of _PyMem_SetDefaultAllocator during finalization (Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization #111924) -
654be8ffd6gc: make the garbage collector non-generational (Make the garbage collector thread-safe in--disable-gilbuilds #112529) -
967fe31473gc: Traverese mimalloc heaps to find all objects. (Make the garbage collector thread-safe in--disable-gilbuilds #112529) -
2864b6b36eImplement stop-the-world pauses (Implement stop-the-world functionality (for--disable-gilbuilds) #111964) -
2864b6b36egc: implement stop-the-world GC (Make the garbage collector thread-safe in--disable-gilbuilds #112529) -
c1befd7689Stop the world before fork() and Python shutdown (Use stop-the-world to make fork and interpreter shutdown thread-safe #116522) -
82800d8ec8ceval: stop the world when enabling profiling/tracing for all threads (Makesys.settrace,sys.setprofile, andsys.monitoringthread safe in--disable-gilbuilds #116818) -
7423dff344pystate: use stop-the-world in a few places (Use stop-the-world to makesys._current_frames()andsys._current_exceptions()thread-safe in free-threaded build #117300) -
86efa7dfe3pystate: implement _PyRuntime.multithreaded -
d896dfc8dbdict: make dict thread-safe (Makedictobjects thread-safe in--disable-gilbuilds #112075) -
df4c51f82blist: make list thread-safe (Makelistobjects thread-safe in--disable-gilbuilds #112087) -
9c1f7ba1b4mro: thread-safe MRO cache (Make the MRO cache thread-safe in free-threaded builds #113743) -
7a7aca096bgetargs.c: make parser_init thread-safe (Thread-safe one-time initialization #111956) -
0dddcb6f9dweakref: make weakrefs thread-safe without the GIL (Make weakref thread-safe without the GIL #111926) -
410ba1036adtoa: make dtoa thread-safe (dtoa: thread safety in--disable-gilbuilds #111962) -
6540bf3e6aunicode: make unicodeobject.c thread-safe (unicode: make_PyUnicode_FromIdthread-safe in--disable-gilbuilds #111971) -
5d006db9facodecs.c: fix race condition (unicode: make ucnhash_capi initialization thread-safe in--disable-gilbuilds #111972) -
d1b5ed128e_threadmodule: make _thread.lock thread-safe (Make_threadmodule.cthread-safe in--disable-gilbuilds #114271) -
cfc11bcb1atypeobject: thread safety -
cfecf6f4ebthreading: remove _tstate_lock from threading.Thread (Make_threadmodule.cthread-safe in--disable-gilbuilds #114271) -
74df7785f5pyqueue: add internal queue data structure -
4450445f51pymem: add _PyMem_FreeQsbr (Add delayed reclamation mechanism for free-threaded build (QSBR) #115103) -
7e60a01aeequeue: make SimpleQueue thread-safe (Make queue.SimpleQueue thread-safe in--disable-gilbuilds #113884) -
4ca2924f0dset: make set thread-safe (Makesetthread-safe in--disable-gilbuilds #112069) -
3cfbc49229moduleobject: fix data races -
5722416ef5_threadmodule: thread-safety fixes (Make_threadmodule.cthread-safe in--disable-gilbuilds #114271) -
31ec6f0290pystate: refcount threads to handle race between interpreter shutdown and thread exit -
45bdd27ee5threading: make _thread.lock thread-safe -
07f5f8c318slice: move slice_cache to per-thread state (Use per-thread freelists in--disable-gilbuilds #111968) -
ea1160c6d7asyncio: fix race conditions in enter_task and leave_task -
212fef480eobject.c: fix race when accessing attributes and methods (Use PyDict_GetItemRef() #111789) -
70856f126dasdl: use _PyOnceFlag in Python-ast.c (Thread-safe one-time initialization #111956) -
360a79cb88socketmodule.c: use relaxed atomics for global 'defaulttimeout' (socketmodule.c: use atomics to accessdefaulttimeoutin free-threaded build #116616) -
041a08e339functools: make lru_cache thread-safe (Makefunctools.lru_cachethread-safe in--disable-gilbuilds #112070) -
9bf62ffc4brandom: add a mutex to guard random.Random (Makerandom.Randomthread-safe in--disable-gilbuilds #112071) -
a8251a8d25clinic: support '@' syntax for recursive mutexes (Argument Clinic: Add support for PEP 703's critical sections (Py_BEGIN_CRITICAL_SECTION()) #111903) -
ffade9d6f6bufferedio: add locks to make print() thread-safe (Use critical sections to protect I/O objects (in--disable-gilbuilds) #111965) -
5b83c16dcdtextio: add locks to make textio thread-safe (Use critical sections to protect I/O objects (in--disable-gilbuilds) #111965) -
6323ca60f9stringio: make stringio thread-safe (Use critical sections to protect I/O objects (in--disable-gilbuilds) #111965) -
f1e4742eaadeque: make most functions thread-safe (Make collections.deque thread-safe in--disable-gilbuilds #112050) -
78825e0508importlib: fix data race in imports (PyImport_ImportModuleLevelObject) -
2f5c90a284semaphore.c: decrease count before release sem_lock (Make multiprocessingSemLockthread-safe in the free-threaded build #117435) -
22eca6e215sha1: make sha1module thread-safe (Make hashlib related modules thread-safe without the GIL #111916) -
ada9b73feb_struct: fix race condition in cache_struct_converter (Make_structmodule thread-safe in--disable-gilbuilds #112062) -
0e0b3899d1signalmodule: fix thread-safety issue on macOS (Unclear if this is still an issue on macOS) -
964bb33962json: make JSON scanner thread safe (json: make "memo" dict local to scan_once call #111928) -
86e7772c64http: fix dependency on finalization order -
9ab96964e7faulthandler: don't dump all threads when running without the GIL -
cff32694a4test_gdb: skip test_threads when running without GIL -
2ae5ee5ed4tests: fix and work around some race conditions in tests -
9f9b3d085fceval: fix some thread-safety issues -
2a4c17e896pystate: move freelists to per-thread state (Use per-thread freelists in--disable-gilbuilds #111968) -
149ea9dc43Deferred reference counting -
7e7568672dspecialize: make specialization thread-safe -
90d34f0d18specialize: optimize for single-threaded programs -
42d3e11d8ccode: make code object use deferred reference counting -
c9fc49666ctest: add support for checking for TSAN -
7507a77a98thread: don't use sem_clockwait with TSAN -
a62d37674c_posixsubprocess: disable vfork when running with ASAN -
398204d57bobject: fix reported TSAN races -
4526c07caeDisable the GIL by default in--disable-gilbuilds (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
3.13bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement