PEP 703 (Making the Global Interpreter Lock Optional in CPython) acceptance

In case it is useful to know and not already known, OCaml went through a similar transition recently to get to its “multicore” version. In previous versions there was the equivalent of a GIL.
Their approach to backward compatibility was:
The unit of parallelism is something new called a “domain”. At startup there is a single domain and any thread created using the standard library’s Thread module works just as before, as though there were a GIL. When there are multiple domains, domains run in parallel, but threads running in each domain have the equivalent of an inside-of-domain GIL. When there is a single thread per domain, that is like what I understand to be called “free-threading” here.

3 Likes