The single biggest new feature in Python 3.13 is something Python users have anticipated for ages: a version of Python that allows full concurrency be

Get started with the free-threaded build of Python 3.13

submited by
Style Pass
2024-10-23 13:00:04

The single biggest new feature in Python 3.13 is something Python users have anticipated for ages: a version of Python that allows full concurrency between Python threads by removing the Global Interpreter Lock. Whether you call it “free-threaded” or “no-GIL” Python, the result is the same: a sea change in the way Python handles application parallelism.

How do you actually use Python’s new free-threading features? In this article, we’ll walk through how Python 3.13 implements no-GIL mode, how you can use it in your programs now, and how things might change in future versions of Python.

When Python’s free-threaded version was first announced, the plan wasn’t to immediately replace the GIL-equipped version of Python. Instead, Python users would have the option to install Python’s free-threaded build side-by-side with the regular version and select between them as needed—for example, by way of the py tool in Windows.

Binary releases of Python 3.13 for Microsoft Windows and macOS come with an option in the installer to set up the free-threaded build. If you select this option (as shown below), two Python executables are installed: python and python3.13t. The former is the regular build; the latter is the free-threaded build.

Leave a Comment