Python 3.15 arrives with lazy imports and new built-in types

Python 3.15 has been released with several major language and tooling updates. The release adds lazy imports, a frozendict immutable dictionary type, and a sentinel() helper for unique marker objects. It also introduces a statistical sampling profiler intended to reduce profiling overhead compared with cProfile.
Python 3.15's release adds several long-requested capabilities. Imports can now be deferred until a module is actually needed, and existing conventional imports can be made to work this way through configuration or an environment setting. A new immutable, hashable dictionary variant, frozendict, joins the built-in types, while sentinel("NAME") creates distinct marker objects with useful representations and type-checking support.
A new profiling.sampling module uses statistical sampling to lower overhead compared with deterministic cProfile, now also called profiling.tracing. CPython's JIT, introduced in 3.13, gains a new tracing front end, register allocation, improved generated machine code, and other optimizations, yielding reported geometric mean speedups of 8% to 13% depending on platform and workload.
Python's changes may affect a broad range of developers, data scientists, educators, and cloud teams who rely on the language. Faster startup and JIT gains could lower compute costs and improve user-facing responsiveness, while sampling profiles may make performance work more accessible. Immutable dictionaries and sentinels could reduce certain classes of bugs. These benefits may arrive unevenly, since projects must adopt new versions and validate compatibility before production use.