Python 3.15: What's New

Python 3.15's key changes — lazy imports, a new profiling package, JIT speedups, and the other PEPs worth knowing about ahead of the October release

Featured

Python 3.15 entered its release-candidate phase on 4 August 2026, with RC2 due 1 September and the final 3.15.0 release scheduled for 1 October. Here’s what actually changes.

Faster startup: lazy imports (PEP 810)

Python 3.15 adds explicit lazy imports — import numpy can be marked to defer the actual import until the name is first used, rather than at module load time. For CLI tools and scripts that import a lot but only use a fraction of it on any given run, this meaningfully cuts startup time. It’s opt-in and explicit, not a silent behavior change to existing imports.

New built-in types: frozendict and sentinel (PEP 814, PEP 661)

frozendict joins frozenset as an immutable built-in — a hashable, read-only dict, useful anywhere you’d otherwise defensively copy a dict to stop callers mutating it. The new sentinel type standardizes the “unique marker object” pattern (commonly hand-rolled as _MISSING = object()) into something the standard library and type checkers understand natively.

A real profiling package (PEP 799)

Python’s profiling tools — cProfile, the newer statistical sampling approach — get organized under a single profiling namespace: profiling.tracing (deterministic call tracing, the cProfile successor) and profiling.sampling, built around a new high-frequency statistical sampler called Tachyon. cProfile remains as a backwards-compatible alias, so existing code doesn’t break.

The experimental JIT gets faster

Python’s JIT (introduced experimentally in 3.13) shows a meaningful step up in 3.15 — core developers report roughly 8-9% geometric-mean speedup on x86-64 Linux and 12-13% on AArch64 macOS versus the standard interpreter. Still experimental and not the default, but the gap to “worth enabling” is closing release over release.

Typing improvements

If you’re working through our type hints guide, a few additions are relevant: TypedDict now supports typed extra items (PEP 728) — you can allow additional keys beyond the declared ones while still typing what those extras look like — and TypeForm (PEP 747) lets you annotate a value that represents a type itself, useful for functions that take a type as an argument (validators, serializers, factory functions).

Smaller changes worth knowing

  • UTF-8 as the default encoding everywhere (PEP 686 groundwork continuing) — fewer platform-dependent encoding surprises, particularly on Windows.
  • Unpacking in comprehensions (PEP 798) — [*x for x in nested]-style unpacking now works directly inside comprehension expressions.
  • Disjoint bases in the type system (PEP 800) — lets type checkers understand that two classes can never share an instance, tightening isinstance narrowing in some patterns.

Should you upgrade on day one?

For most projects, no rush — wait for 3.15.1 or .2 the way you would for any .0 release, unless lazy imports or the JIT improvements solve a specific problem you already have. Library maintainers should start testing against the release candidates now, since 3.15 support in dependencies tends to lag the language release by weeks to months.

TopicsPython 3.15Release NotesLanguage Features