Python 313 Release Notes Verified Jun 2026

The locals() built-in function now has well-defined semantics when modifying the returned mapping, providing consistent behavior for debuggers and introspection tools.

A standardized way to mark classes, functions, and overload structures as deprecated is now available directly in the warnings and typing modules. Static checkers and IDEs will surface these warnings during development. 6. Standard Library Cleanups and Removals

In Python 3.13, the GC now interleaves its work with program execution, reducing peak pause times. This is a – no API changes are required.

: Pressing the up arrow now recalls an entire multi-line code block (such as a full function definition or loop) as a single entity, allowing for effortless structural edits.

Python 3.13 was officially released on . This major update introduces foundational changes aimed at improving performance and developer experience, most notably experimental support for running without the Global Interpreter Lock (GIL) and a new Just-In-Time (JIT) compiler. Core Release Highlights What's New In Python 3.13 — Python 3.14.4 documentation python 313 release notes verified

Internal reference counting has been updated to use biased reference counting to ensure thread safety without substantial single-threaded performance penalties. How to Use It

The sys._is_gil_disabled() function returns True only if CPython was compiled with --disable-gil . The GIL remains enabled unless explicitly compiled otherwise.

The help system is optimized to integrate cleanly into the terminal without disrupting code history.

PEP 703 – Making the Global Interpreter Lock Optional (Experimental) : Pressing the up arrow now recalls an

author: Leader = 'name': 'Yang Zhou', 'age': 30 author['age'] = 31 # Allowed author['name'] = 'Yang' # Type error: 'name' is read-only

Third-party packages should update their typing-extensions dependency to version 4.13.2 or higher to ensure compatibility with Python 3.13's typing module changes.

if sys.version_info >= (3, 13): # Python 3.13+ specific code pass else: # Fallback for older versions pass

class Movie(TypedDict): title: ReadOnly[str] # Cannot be reassigned year: int a file named random.py )

Python 3.13 is a landmark release. It transforms the interactive interpreter from a functional but basic tool into a modern, colorful development environment. It boldly introduces foundational changes to the language's concurrency model with the experimental free-threaded build. It plants the seeds for future performance gains with the initial JIT compiler. It brings a staggering seven new typing features, making Python's type system more expressive and robust than ever. And it cleans house by removing long-deprecated "dead battery" modules from the standard library.

Are you running workloads?

: If a local script shadows a standard library module (e.g., a file named random.py ), the interpreter will explicitly suggest renaming the file.