PEP 684 was accepted – Per-interpreter GIL in Python 3.12
twitter.com
twitter.com
To be clear, this is not "PEP 703 – Making the Global Interpreter Lock Optional in CPython", by Sam Gross. PEP 703 is more ambitious and add quite a bit of complexity to the CPython implementation. PEP 684 mostly cleans things up and encapsulates global state better. The most distruptive change is to allow immortal objects. I hope PEP 703 can go in too, even with the downsides (complexity, bit slower single threaded performance).
colesbury/nogil https://github.com/colesbury/nogil :
docker run -it nogil/python
docker run -it nogil/python-cudaIf I read this correctly immortal objects stop changing refcount which prevents cache line invalidation while `gc.freeze()` just stops cleaning up objects with zero refcount.
Most languages I used, python included, haven't done concurrency in a way that added enough without taking so much away where I have been inclined to use it by default. Maybe this is a change from that for python.