Software 44583 Published by

Python 3.15.0 Beta 4 has officially landed, pushing faster startup times and better observability into the core runtime. The release elevates frozendict to a native built-in, implements explicit lazy imports, and makes UTF-8 the system-wide default for all I/O operations. Infrastructure changes include default frame pointers for cleaner stack traces and the new Tachyon statistical profiler to replace the aging profile module. With the final October release approaching, teams should start testing against the new defaults and API deprecations immediately.



Python 3.15 Beta 4 Ships With Built-in frozendict, Lazy Imports, and UTF-8 Defaults

Python 3.15.0 Beta 4 hit the release trains today. The fourth beta brings a heavy dose of performance tweaks, new built-ins, and a few ecosystem-shifting defaults. October’s final release will feel less like a standard upgrade and more like a targeted migration for many teams.

The development cycle has moved aggressively since the January beta. You have probably noticed the rapid changes to the import system, the profiler, and the C API. This release tightens the screws on startup times, observability, and type safety. If you are still running on 3.13 or 3.14, you should test your stack now rather than waiting for the September release candidate.

Python

Built-ins, Syntax, and the Import System

frozendict is finally a real built-in type instead of a third-party patch. It inherits directly from object, stays hashable when its contents allow it, and ignores insertion order during comparison. You can still use the standard dict if you need mutability, but immutable configs and cache keys finally get first-class support. The standard library quietly updated json, pickle, and copy to handle the new type without breaking existing workflows.

Lazy imports also landed, courtesy of PEP 810. You can now write lazy import json at the module level to defer loading until you actually touch it. It is a lightweight proxy system, not a magic wand, but it directly targets those sluggish startup times that plague larger frameworks. The CPython team added sys.set_lazy_imports_filter() for precise control, so you do not have to guess what is loading when.

The error messages got a serious brain transplant. AttributeError suggestions now check inner attributes, cross-reference JavaScript and Java method names, and even tell you when you are trying to append to a tuple. It is a minor quality-of-life win, but it saves developers from Googling the obvious. You can also grab * and ** unpacking directly inside comprehensions, which finally removes the need for messy flattening loops.

Profiling, Infrastructure, and the Path to October

Python 3.15 officially reorganizes its profiling stack under a new profiling module. The star here is Tachyon, a high-frequency statistical sampler that attaches to running processes by PID and pushes up to 1,000,000 Hz sampling rates. You can dump flame graphs, monitor GIL-holding time, or run it async-aware. The old profile module is officially deprecated for removal in 3.17, so cProfile remains your backward-compatible crutch for now.

On the infrastructure side, frame pointers are enabled by default on supported platforms. That means faster, more reliable stack unwinding for debuggers and eBPF tools. Windows 64-bit binaries are also switching to a tail-calling interpreter, which should trim a bit more overhead from the runtime. C extension authors will need to check their build configs to make sure these flags actually propagate to their modules.

The most controversial default change is probably UTF-8. PEP 686 makes UTF-8 the system-wide default for I/O, regardless of your locale. You can override it with PYTHONUTF8=0 or -X utf8=0, but the old behavior is not coming back by default. If your project relies on system encodings for legacy compatibility, you will need to audit your file I/O calls before upgrading.

Speaking of garbage collection, the team pulled the incremental GC from 3.14 due to memory pressure in production. That is a pragmatic U-turn. The JIT compiler also received significant upgrades, though exact benchmarks are still trickling out. Combined with the frame pointer changes and the reverted GC, CPython is clearly trying to squeeze more throughput out of the runtime.

Release Timeline and Next Steps

Beta 4 sits in the final stretch of the 3.15 cycle. You can grab the tagged release from GitHub right now. The release candidate is expected around September, with general availability landing in October. If you are maintaining third-party packages, test against the beta today. The frozendict shift, UTF-8 default, and .pth to .start file migration will hit the ecosystem hard when 3.15 ships.

Head to the official announcement for the full list of module updates, removed APIs, and C API changes. Keep in mind that the profile module deprecation timeline means you should start migrating to profiling.tracing now.