-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 703 -- Making the Global Interpreter Lock Optional in CPython #108219
Labels
3.13
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-free-threading
type-feature
A feature request or enhancement
Comments
colesbury
added
type-feature
A feature request or enhancement
3.13
bugs and security fixes
labels
Aug 21, 2023
3 tasks
5 tasks
4 tasks
4 tasks
3 tasks
11 tasks
11 tasks
corona10
added a commit
to corona10/cpython
that referenced
this issue
Sep 7, 2024
AA-Turner
added a commit
that referenced
this issue
Sep 8, 2024
…3802) Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Itamar Oren <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 8, 2024
pythonGH-123802) (cherry picked from commit aa3f11f) Co-authored-by: Donghee Na <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Itamar Oren <[email protected]>
Yhg1s
pushed a commit
that referenced
this issue
Sep 24, 2024
…ew (GH-123802) (#123847) gh-108219: Add credits to the free-threading entry in What's New (GH-123802) (cherry picked from commit aa3f11f) Co-authored-by: Donghee Na <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Itamar Oren <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.13
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-free-threading
type-feature
A feature request or enhancement
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
--disable-gil
builds are not compatible with the limited API #111506--disable-gil
builds install incompatible stable ABI extensions #111870--disable-gil
builds #115999--disable-gil builds
#116024_thread.lock.release()
is not thread-safe in free-threaded builds #117721list.__getitem__
#119053Completed Issues
Completed Issues
--disable-gil
option for Windows builds #108374ATTACHED
,DETACHED
,GC
toPyThreadState
to support PEP 703 #109549--disable-gil
builds #109740--disable-gil
test failures due to ABI flag #110119--disable-gil
builds (PEP 703) in packaging.tags pypa/packaging#727_struct
module thread-safe in--disable-gil
builds #112062Py_BEGIN_CRITICAL_SECTION()
) #111903functools.lru_cache
thread-safe in--disable-gil
builds #112070--disable-gil
builds) #111965@critical_section
directive #112213random.Random
thread-safe in--disable-gil
builds #112071--disable-gil
builds #111972_PyThreadStateImpl
"wrapper" forPyThreadState
#112538--disable-gil
builds #111962_Py_ThreadId()
work on PowerPC, IBM Z, etc. #112535_PyUnicode_FromId
thread-safe in--disable-gil
builds #111971--disable-gil
builds) #111964--disable-gil
builds #113884PyList_GetItemRef
, a variant ofPyList_GetItem
that returns a strong reference #114329PyDict_SetDefault
that returns a new reference (instead of a borrowed reference) #112066--disable-gil
builds #110481--disable-gil
builds #112532--disable-gil
builds #112050--disable-gil
builds #111968ob_tid
,ob_ref_local
, andob_ref_shared
fields valid across allocations in free-threaded build #115491eval_breaker
toPyThreadState
#112175list
objects thread-safe in--disable-gil
builds #112087defaulttimeout
in free-threaded build #116616--with-thread-sanitizer
#112536_warnings.c
thread-safe in free-threaded build #116664cell
thread-safe in the free-threaded build #117323sys._current_frames()
andsys._current_exceptions()
thread-safe in free-threaded build #117300SemLock
thread-safe in the free-threaded build #117435_threadmodule.c
thread-safe in--disable-gil
builds #114271set
thread-safe in--disable-gil
builds #112069sys.settrace
,sys.setprofile
, andsys.monitoring
thread safe in--disable-gil
builds #116818sys._is_gil_enabled()
#117514--disable-gil
builds #112529dict
objects thread-safe in--disable-gil
builds #112075Deferred tasks
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" buildsdcddbe2ddb
configure: add support for --with-thread-sanitizer (Add support for thread sanitizer (TSAN) via--with-thread-sanitizer
#112536)f546dbf16a
Enable/disable the GIL at runtime (Add a mechanism to disable the GIL #116167)f30d8d8f50
Add pyatomic.h385eb1d99c
pyport: add new macrosde2be447b3
Make PyThreadState_GET thread-locala24dc2ecc3
pystate: keep track of attached vs. detached state4584be5950
parking_lot: add mutexes and one-time notifications6845b133cc
critical_section: helpers for fine-grained locking (Implement Python Critical Sections from PEP 703 #111569)8ed62cab6a
pystate: use _PyRawMutex for internal mutexes (Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization #111924)e15443b1f2
ceval: move eval_breaker to per-thread state (Move theeval_breaker
toPyThreadState
#112175)b6b12a9a94
Implement biased reference countingb6b12a9a94
Implement BRC inter-thread queue (Implement biased reference counting in--disable-gil
builds #110481)7b6b6f1a01
unicode: immortalize interned stringsfc173e3711
unicode: always immortalize interned stringsdd9b78460c
Add safe memory reclamation scheme based on FreeBSD's GUS901e134921
Add mimalloc v2.0.9 (DinoV)b6980856df
Additional mimalloc changes (mimalloc: additional integration and changes for--disable-gil
builds #112532)d13c63dee9
pymem: remove uses of _PyMem_SetDefaultAllocator during finalization (Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization #111924)654be8ffd6
gc: make the garbage collector non-generational (Make the garbage collector thread-safe in--disable-gil
builds #112529)967fe31473
gc: Traverese mimalloc heaps to find all objects. (Make the garbage collector thread-safe in--disable-gil
builds #112529)2864b6b36e
Implement stop-the-world pauses (Implement stop-the-world functionality (for--disable-gil
builds) #111964)2864b6b36e
gc: implement stop-the-world GC (Make the garbage collector thread-safe in--disable-gil
builds #112529)c1befd7689
Stop the world before fork() and Python shutdown (Use stop-the-world to make fork and interpreter shutdown thread-safe #116522)82800d8ec8
ceval: stop the world when enabling profiling/tracing for all threads (Makesys.settrace
,sys.setprofile
, andsys.monitoring
thread safe in--disable-gil
builds #116818)7423dff344
pystate: 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)86efa7dfe3
pystate: implement _PyRuntime.multithreadedd896dfc8db
dict: make dict thread-safe (Makedict
objects thread-safe in--disable-gil
builds #112075)df4c51f82b
list: make list thread-safe (Makelist
objects thread-safe in--disable-gil
builds #112087)9c1f7ba1b4
mro: thread-safe MRO cache (Make the MRO cache thread-safe in free-threaded builds #113743)7a7aca096b
getargs.c: make parser_init thread-safe (Thread-safe one-time initialization #111956)0dddcb6f9d
weakref: make weakrefs thread-safe without the GIL (Make weakref thread-safe without the GIL #111926)410ba1036a
dtoa: make dtoa thread-safe (dtoa: thread safety in--disable-gil
builds #111962)6540bf3e6a
unicode: make unicodeobject.c thread-safe (unicode: make_PyUnicode_FromId
thread-safe in--disable-gil
builds #111971)5d006db9fa
codecs.c: fix race condition (unicode: make ucnhash_capi initialization thread-safe in--disable-gil
builds #111972)d1b5ed128e
_threadmodule: make _thread.lock thread-safe (Make_threadmodule.c
thread-safe in--disable-gil
builds #114271)cfc11bcb1a
typeobject: thread safetycfecf6f4eb
threading: remove _tstate_lock from threading.Thread (Make_threadmodule.c
thread-safe in--disable-gil
builds #114271)74df7785f5
pyqueue: add internal queue data structure4450445f51
pymem: add _PyMem_FreeQsbr (Add delayed reclamation mechanism for free-threaded build (QSBR) #115103)7e60a01aee
queue: make SimpleQueue thread-safe (Make queue.SimpleQueue thread-safe in--disable-gil
builds #113884)4ca2924f0d
set: make set thread-safe (Makeset
thread-safe in--disable-gil
builds #112069)3cfbc49229
moduleobject: fix data races5722416ef5
_threadmodule: thread-safety fixes (Make_threadmodule.c
thread-safe in--disable-gil
builds #114271)31ec6f0290
pystate: refcount threads to handle race between interpreter shutdown and thread exit45bdd27ee5
threading: make _thread.lock thread-safe07f5f8c318
slice: move slice_cache to per-thread state (Use per-thread freelists in--disable-gil
builds #111968)ea1160c6d7
asyncio: fix race conditions in enter_task and leave_task212fef480e
object.c: fix race when accessing attributes and methods (Use PyDict_GetItemRef() #111789)70856f126d
asdl: use _PyOnceFlag in Python-ast.c (Thread-safe one-time initialization #111956)360a79cb88
socketmodule.c: use relaxed atomics for global 'defaulttimeout' (socketmodule.c: use atomics to accessdefaulttimeout
in free-threaded build #116616)041a08e339
functools: make lru_cache thread-safe (Makefunctools.lru_cache
thread-safe in--disable-gil
builds #112070)9bf62ffc4b
random: add a mutex to guard random.Random (Makerandom.Random
thread-safe in--disable-gil
builds #112071)a8251a8d25
clinic: support '@' syntax for recursive mutexes (Argument Clinic: Add support for PEP 703's critical sections (Py_BEGIN_CRITICAL_SECTION()
) #111903)ffade9d6f6
bufferedio: add locks to make print() thread-safe (Use critical sections to protect I/O objects (in--disable-gil
builds) #111965)5b83c16dcd
textio: add locks to make textio thread-safe (Use critical sections to protect I/O objects (in--disable-gil
builds) #111965)6323ca60f9
stringio: make stringio thread-safe (Use critical sections to protect I/O objects (in--disable-gil
builds) #111965)f1e4742eaa
deque: make most functions thread-safe (Make collections.deque thread-safe in--disable-gil
builds #112050)78825e0508
importlib: fix data race in imports (PyImport_ImportModuleLevelObject)2f5c90a284
semaphore.c: decrease count before release sem_lock (Make multiprocessingSemLock
thread-safe in the free-threaded build #117435)22eca6e215
sha1: make sha1module thread-safe (Make hashlib related modules thread-safe without the GIL #111916)ada9b73feb
_struct: fix race condition in cache_struct_converter (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)964bb33962
json: make JSON scanner thread safe (json: make "memo" dict local to scan_once call #111928)86e7772c64
http: fix dependency on finalization order9ab96964e7
faulthandler: don't dump all threads when running without the GILcff32694a4
test_gdb: skip test_threads when running without GIL2ae5ee5ed4
tests: fix and work around some race conditions in tests9f9b3d085f
ceval: fix some thread-safety issues2a4c17e896
pystate: move freelists to per-thread state (Use per-thread freelists in--disable-gil
builds #111968)149ea9dc43
Deferred reference counting7e7568672d
specialize: make specialization thread-safe90d34f0d18
specialize: optimize for single-threaded programs42d3e11d8c
code: make code object use deferred reference countingc9fc49666c
test: add support for checking for TSAN7507a77a98
thread: don't use sem_clockwait with TSANa62d37674c
_posixsubprocess: disable vfork when running with ASAN398204d57b
object: fix reported TSAN races4526c07cae
Disable the GIL by default in--disable-gil
builds (Disable the GIL by default in free-threaded builds #116329)Linked PRs
The text was updated successfully, but these errors were encountered: