Python 3.15 is here. The annual release of the world's most widely used programming language landed on October 9, about a week later than the date pencilled into the release schedule, after a surprise third release candidate fixed late lazy-import bugs. Release manager Hugo van Kemenade announced the final build on the Python Insider blog, capping a cycle that the release notes put at over five thousand six hundred commits from more than a thousand contributors.
"Python 3.15.0 is the newest major release of the Python programming language," van Kemenade wrote in the announcement. Windows installer lead Steve Dower and macOS installer lead Ned Deily coordinated the platform installers, and van Kemenade thanked the Sovereign Tech Agency for backing his release work through its Sovereign Tech Fellowship.
What changes for everyday code
The most visible addition is explicit lazy imports, the headline feature of PEP 810. Traditionally, Python loads imported modules immediately, even when a program does not touch them, which can drag down startup times for large applications with heavy dependency trees. Python 3.15 adds a lazy import declaration that defers loading until the module is first accessed, so a heavy library can be declared without paying the loading cost up front. The import completes when the code first reaches for it.
Two new built-in types join the language. The first, frozendict from PEP 814, is an immutable dictionary that preserves insertion order and can serve as a hashable object when its keys and values are hashable. The second, sentinel from PEP 661, standardizes the creation of unique marker values, which API authors commonly use to tell the difference between an argument that was omitted entirely and one explicitly set to None. Developers also get unpacking inside comprehensions (PEP 798) and package startup configuration files (PEP 829).
Text handling gets a long-awaited simplification: UTF-8 is now the default encoding, as specified in PEP 686. That brings consistency across operating systems and cuts down on encoding surprises when code moves between Linux, Windows, and macOS, according to the official release notes. Code that depended on the old platform default can switch back by disabling UTF-8 mode through an environment variable, which the release notes document as the escape hatch for affected applications.
Speed and tooling
The experimental just-in-time compiler is finally posting numbers worth talking about. On x86-64 Linux, the upgraded compiler runs 7 to 8 percent faster than the standard interpreter by geometric mean; on AArch64 macOS, it runs 11 to 12 percent faster than the tail-calling interpreter. The 3.15 version gains a tracing frontend, and the Mac figures matter because the tail-calling interpreter is itself a quicker baseline than the classic one. The catch has not changed: the JIT is still labelled experimental and only runs in builds that support it with the feature switched on, so most developers installing 3.15 today will not encounter it directly.
Profiling got a proper home. PEP 799 adds a dedicated profiling package in the standard library, and inside it a high-frequency statistical sampling profiler called Tachyon. Tachyon can attach to a running Python process without a restart or code changes, track CPU time, wall-clock time, and time spent holding the Global Interpreter Lock, and feed the results into flame graphs and other visualizations. CPython also enables frame pointers by default on supported platforms (PEP 831), which makes native stack tracing more reliable and improves compatibility with system-level debugging tools, including eBPF-based ones. Free-threaded builds, which let Python threads run without the Global Interpreter Lock, pick up stable ABI support and related C API improvements through PEPs 803, 820, and 793. Typing receives three smaller changes: PEP 728 adds typed extra items to TypedDict, PEP 747 introduces TypeForm annotations, and PEP 800 covers disjoint bases.
Availability
Python 3.15.0 is available now from the official Python Insider release announcement and the downloads page. The official 64-bit Windows binaries now use the tail-calling interpreter, while the macOS installers ship free-threading support by default. Beyond the headline features, the release brings improved error messages, more color in command-line output, and new typing capabilities, as reported by Linuxiac's coverage of the release, which also documents the JIT gains and the new lazy import machinery.
For anyone who wants to try the new features interactively, Python developer Barry Warsaw has published whatsnewt, a terminal-based adventure game built around the release: eighteen puzzles, each exercising a Python 3.15 capability, playable from the terminal. The release notes recommend it as the hands-on route through the year's changes.
Comments 0
No comments yet. Be the first to share your thoughts!
Leave a comment
Share your thoughts. Your email will not be published.