Skip to main content

Python 3.15.0

Release Date: October 9, 2026

Python 3.15.0 was released on October 9, 2026, the first stable build of the 3.15 series and the direct successor to 3.14. The headline changes are language level: explicit lazy imports, a built-in frozendict, and a built-in sentinel type. Behind them sits the largest upgrade to CPython's experimental JIT compiler since it landed, plus a new profiling package in the standard library.

What Changed

PEP 810 introduces a lazy soft keyword. Writing lazy import json or lazy from pathlib import Path keeps the import at the top of the module but defers loading until the name is first accessed. For applications with deep dependency trees, that removes work from startup without scattering imports through function bodies.

  • PEP 814 adds frozendict, an immutable dictionary type usable as a dictionary key or a set member.
  • PEP 661 adds sentinel, a built-in type for unique placeholder values, replacing the object() idiom.
  • PEP 686 makes UTF-8 the default encoding for files opened without an explicit encoding on Windows and in other locales that previously used the platform code page.
  • PEP 798 allows unpacking in comprehensions, so [ *row for row in rows ] and { **mapping for mapping in mappings } are valid.
  • PEP 829 adds package startup configuration files, letting an installed package declare interpreter startup settings instead of relying on site customization.
  • PEP 831 enables frame pointers by default, which makes native profilers and system-level tracing work on stock builds.
  • PEP 803 gives free-threaded builds a stable ABI, so extension modules compiled against it can survive minor releases.

The JIT Gets a Real Foundation

The 3.15 JIT replaces the previous estimation-based frontend with one that records actual execution paths, and it now understands object creation, overloaded operators, and generators. A basic register allocator, wider constant propagation, and reference-count elision were added on top. The interpreter now uses LLVM 21 for build-time stencil generation, though LLVM is still only needed when compiling CPython with the JIT enabled.

The published pyperformance results put the JIT at a 7 to 8 percent geometric mean improvement over a fully optimized standard interpreter on x86-64 Linux, and 11 to 12 percent over the tail-calling interpreter on AArch64 macOS. Individual benchmarks range from about 15 percent slower to more than double the speed of a no-JIT build, so the wins remain workload dependent.

Profiling Moves Into the Standard Library

PEP 799 creates a dedicated profiling package and ships Tachyon, a high-frequency statistical sampling profiler. Tachyon samples at high rates without the overhead of deterministic tracing, which makes it practical for profiling production-shaped workloads rather than only benchmarks. Terminal output also gained more color across the standard library's command-line tools.

Removals and Porting Notes

The private sre_* modules are gone, along with a set of long-deprecated APIs across ast, pathlib, typing, importlib, and wave. Several behavior changes will surface in existing code:

  • Every parameter of sqlite3.connect() except database is now keyword-only.
  • base64.urlsafe_b64decode() no longer requires padding unless padded=True is passed.
  • unittest's assertWarns() and assertWarnsRegex() no longer swallow warnings that do not match, which can expose warnings previously masked in tests.
  • resource.RLIM_INFINITY is always positive, and passing the old negative sentinel value is deprecated.
  • argparse now infers dest from a single-dash long option, so add_argument('-f', '-foo') produces foo instead of f.

Why It Matters

Lazy imports and the UTF-8 default address two of the most common cross-platform complaints in the same release. frozendict closes an old gap in the type system, and the free-threaded stable ABI is the piece that makes no-GIL builds viable for extension authors rather than only for experiments. The Windows 64-bit installers now ship the tail-calling interpreter, and the macOS installers enable free-threading support by default, so the fast paths are no longer opt-in artifacts.

What's Next

Python 3.15 enters its bugfix cycle with 3.16 already open on main. Projects that ship wheels for free-threaded builds should test against the stable ABI now, and anyone with pinned dependencies should run the test suite against 3.15 before the ecosystem moves. The full release notes and the porting guide are published with the documentation.

Other Versions

By continuing to use the site, you agree to the use of cookies.