HarmonyFidelisHarmonyFidelis
Login
NewsMajor ProjectsActorsAcademy

Python 3.13: the GIL becomes optional (experimental free-threading mode)

Python 3.13 introduces Free-threaded mode, allowing threads to run in true parallel on multicore architectures.

Source: peps.python.org

Python 3.13: the GIL becomes optional (experimental free-threading mode)

The Python Foundation released Python 3.13 in early October 2024. The major technical evolution of this version is the introduction of the "Free-threaded" mode defined in the implementation of PEP 703, which disables the GIL (Global Interpreter Lock).

In plain terms

Until now, a Python interpreter worked like a room with a single microphone being passed around: several threads could coexist, but only one spoke at a time, because the GIL prevented them from executing bytecode simultaneously. On a machine with several cores, that amounted to leaving part of the available power unused as soon as a program tried to compute in parallel. Python 3.13 makes this lock optional: the interpreter can now be compiled so as to spread the compute load across all available physical cores, without creating a block. The caveat is substantial — the feature is offered on an experimental basis, the GIL remains active by default, and libraries developed in C have to be adapted. This is therefore the beginning of a transition, not an immediate switchover.

Release fact sheet

ParameterValue
VersionPython 3.13
PublisherPython Foundation
Releaseearly October 2024
Major technical evolutionintroduction of the "Free-threaded" mode
SpecificationPEP 703 — Making the Global Interpreter Lock Optional in CPython
Technical effectdisabling of the GIL (Global Interpreter Lock)
Implementationcompilation of the interpreter by the developer
Statusexperimental — the GIL remains active by default
Ecosystem prerequisiteadaptation of libraries developed in C
Intended scopethreads running in true parallel on multicore architectures

Technical explanation

1. What the GIL locked down — Historically, the GIL prevented several threads of the same Python interpreter from executing bytecode simultaneously.

2. The cost on multicore processors — This constraint severely limited the performance of parallel applications on multicore processors.

3. What Free-threaded mode allows — With this version, developers have the option of compiling the interpreter so as to spread the compute load across all available physical cores, without creating a block.

Before and after

AspectInterpreter with the GILFree-threaded mode (Python 3.13)
Bytecode executiona single thread of a given interpreter at a timethreads in true parallel
Cores usedperformance of parallel applications severely limited on multicore processorscompute load spread across all available physical cores
Blockingglobal lock on bytecode executionno block introduced
Activationdefault behaviourdedicated compilation of the interpreter, on an experimental basis
Libraries developed in Chistorical behaviouradaptation required

Causal chain

GIL historically present in the interpreter → a single thread executes bytecode at a time → performance of parallel applications severely limited on multicore processors → PEP 703: making the lock optional → Python 3.13 introduces Free-threaded mode → the interpreter can be compiled to spread computation across all available physical cores → adaptation of libraries developed in C → transition of the Python ecosystem towards full multicore optimisation

Limits and scope

Although this feature is offered on an experimental basis (the GIL remains active by default) and requires the adaptation of libraries developed in C, this release begins the transition of the Python ecosystem towards full multicore optimisation.

Sources

References verified during the factual audit of August 2026: these are the pages
against which the claims in this briefing have been checked.

  1. PEP 703 — Making the Global Interpreter Lock Optional in CPython
  2. What's New In Python 3.13 — official documentation
  3. Python 3.13.0 release — python.org