A fast, free threading Python

Honestly, it seems to me you are asking to promote the GIL as a feature of CPython instead of an implementation detail. If this is the case then should be documented, because IMHO it’s impossible to have free-threading and the GIL in the same time.

(Moderator can you do something to slow down this thread?)


The reference implementations on top of 3.9 and 3.12 exist, and many discussions (especially those involving benchmarks) are based on those. There are some missing things, as the PEP says, but it is a valid and working implementation.

It is true that multi-threaded programming is harder than single-threaded programming. The PEP does include some safety guarantees and locks, e.g. to containers. Using multi-threading is not mandatory, and if a programmer does not want to take on the responsibility and does not want to bother with thread safety, they can just continue writing single-threaded code and have more safety (although even with a single thread and no concurrency at all, you can mess up in other areas as well if you are not careful about what your code does and how it behaves in various scenarios.)

If you look at the lists of things removed in recent Python versions in What’s New documents (e.g. 3.11) and at porting instructions in the same documents, you might notice Python does not guarantee that 100% of code that worked under Python 3.n will work under Python 3.(n+1) without changes. So yes, you can easily label 3.11 as backwards-incompatible with 3.10.

(Please don’t silence the discussion, that won’t do Python any good.)


Closing for essentially the same reasons as PEP 703: Making the Global Interpreter Lock Optional (3.12 updates) - #155 by davidism. This discussion has begun to go in circles, with new people showing up who are repeating questions and topics that have already been well covered previously.

The developers working on the GIL removal and other faster Python initiatives are all aware of the issues surrounding it, and are taking them into account. Work is being done, and changes are not being made lightly or without consideration.

At this point, discussion about this topic should focus on specific technical points, not high level guesses about how things might work. There is a reference implementation, and years of discussion, to refer to. I’m sure the developers would appreciate more people trying these things out and contributing reports or patches to fix real issues, so please focus further efforts there.