Python 3.15 ships explicit lazy imports and a frozendict type
The annual release lets you defer module loading with a lazy keyword, adds an immutable frozendict to builtins, and upgrades the experimental JIT compiler.
Python 3.15.0 came out on 9 October, built from 5,643 commits by 1,012 contributors. The headline addition is explicit lazy imports (PEP 810): write lazy import json and the module does not fully load until you actually use it, cutting startup latency without restructuring your code. You can also flip it on globally with -X lazy_imports=all or the PYTHON_LAZY_IMPORTS environment variable, and control it at runtime through sys.set_lazy_imports().
The release also adds frozendict as a built-in type: an immutable, hashable mapping that is not a subclass of dict, so isinstance(x, dict) checks will not catch it. Code that needs to accept both now has to check isinstance(x, (dict, frozendict)) or switch to collections.abc.Mapping. Elsewhere, file I/O without an explicit encoding now defaults to UTF-8, comprehensions support unpacking ([*L for L in lists]), and the experimental JIT compiler got what the changelog calls a significant upgrade. A new sampling profiler, Tachyon, can attach to a running process by PID at rates up to 1,000,000 Hz.
lazy import json
lazy from pathlib import Path
print("starting up") # json, pathlib not yet imported
data = json.loads("{}") # json imports here, on first use
Why it matters: lazy imports are opt-in and the frozendict/dict split is the kind of thing that quietly breaks an isinstance check in a library you depend on. Worth a changelog read before you upgrade anything that does a lot of type-checking on dict-like arguments.