Yesterday, Python 3.13 was released, one of the most anticipated versions of the interpreter. The main attraction for me has always been the possibility of running code in Python without GIL (Global Interpreter Lock). The GIL has haunted Python for a long time and has always been a topic of many discussions.
For a long time, there have been attempts to remove the GIL from the interpreter. But what does it block? When we run code with multiple threads in Python, the GIL ensures that common structures in the interpreter are protected between these threads, i.e., against concurrency problems. Several attempts were made, but all left Python slower or only worked for specific cases. A rant by Guido - It isn’t Easy to Remove GIL (https://www.artima.com/weblogs/viewpost.jsp?thread=214235) in response to this post Data Services and Integration, An open letter to Guido van Rossum: Mr Rossum, tear down that GIL! (http://web.archive.org/web/20080907123430/http://blog.snaplogic.org/?p=94). Nothing better than PEP-703 (https://peps.python.org/pep-0703/) to understand how these conversations ended. In reality, they didn’t end, the GIL can be enabled or disabled and each user can choose which version of the interpreter they want to use. Not all is well, as many libraries still need more time to support this option and even stabilize their codes.