This change improves the JIT's ability to reason about variable locations. If your code relied on mutating locals() inside a function, it will break. This is verified in the release notes as a necessary change for performance.
Type parameters for generic classes, functions, and type aliases can now have default values. This eliminates duplicate code blocks for common use cases.
: Multi-threaded programs can now scale workloads across multiple CPU cores natively.
While the JIT compiler is the headline performance feature, Python 3.13 includes several other optimizations: python 313 release notes verified
: Standard installers now include the free-threaded binary, typically named python3.13t on Unix-like environments.
def test(): x = 10 locs = locals() locs['x'] = 20 print(x) # In Python 3.12: prints 20 (unspecified behavior). In Python 3.13: prints 10.
The first thing you'll notice when launching Python 3.13 is a redesigned REPL (Read-Eval-Print Loop). Based on PyPy's implementation, the new interactive interpreter features multi-line editing, color support, and colorized exception tracebacks. This makes the REPL far more user-friendly for both beginners testing snippets and experienced developers debugging code. This change improves the JIT's ability to reason
To safely remove the GIL, Python integrated a modified version of mimalloc , a scalable, thread-safe memory allocator from Microsoft. 2. Experimental Copy-and-Patch JIT Compiler (PEP 744)
: Multi-line snippets containing uneven indentation or mixed statements can now be pasted directly into the prompt without triggering standard indentation errors.
Free-threaded CPython represents a major milestone in the language's history, opening the door to true parallelism for CPU-intensive Python applications. Type parameters for generic classes, functions, and type
Scheduled to receive bugfix updates until approximately October 2026.
💻 Developer Experience: A Rewritten REPL & Smart Diagnostics
| Feature | Enhancement | |---------|-------------| | Multi-line editing | Easily navigate and edit complex code blocks | | Color support | Syntax highlighting and clearer error messages | | Colorized tracebacks | Visually differentiate errors at a glance | | Better error recovery | More forgiving REPL that handles mistakes gracefully |
Python 3.13 introduces a major upgrade to the default interactive shell.