Python 3.15 is out: lazy imports, frozendict and a built-in sampling profiler
Python 3.15 shipped on 9 October, and the headline is a language-level fix for slow startup: PEP 810 adds a lazy soft keyword so lazy import json defers loading a module until it is first used. Two long-requested built-ins arrive as well: an immutable, hashable frozendict (PEP…
Python 3.15 shipped on 9 October, and the headline is a language-level fix for slow startup: PEP 810 adds a lazy soft keyword so lazy import json defers loading a module until it is first used. Two long-requested built-ins arrive as well: an immutable, hashable frozendict (PEP 814) and a sentinel type for unique marker values (PEP 661). Comprehensions can now unpack with * and **, and open() defaults to UTF-8 on every platform, a change worth testing in any Windows-hosted pipeline that relied on locale encodings. For performance work there is a new profiling package with Tachyon, a low-overhead sampling profiler that can attach to running processes and emit flame graphs, and frame pointers are now on by default for better native stack unwinding. Free-threaded builds get a stable ABI target (abi3t) so extension authors can ship wheels for them, and the experimental JIT was significantly upgraded. Before rolling into production images, check the UTF-8 default and the removed __cached__ attribute against your dependencies.
This is a summary by our content curator. Read the original at Python Insider: https://blog.python.org/2026/10/python-3150-final-is-here.