
Python 3.15 Beta 1 landed on May 11 with feature freeze locked in and an October 1 release date confirmed. Three additions stand out: a lazy keyword that cuts startup time by up to 70%, a zero-overhead sampling profiler called Tachyon that can attach to a running process, and a rewritten JIT front end with 50% broader code coverage. Here is what changed and what to do with it.
Lazy Imports: Finally, Fast Startup Without the Hacks
Python’s startup problem is well-documented: importing numpy, pandas, or any large library means Python locates the file, reads it from disk, compiles it to bytecode, and executes all top-level code before your program runs a single line. A CLI tool pulling in five heavy dependencies might wait two seconds before doing anything. Developers have worked around this with conditional imports, importlib hacks, and lazy-loading recipes scattered across blog posts for years. PEP 810 replaces all of that.
Python 3.15 adds a lazy soft keyword directly at the import level:
lazy import json
lazy import numpy as np
lazy from pathlib import Path
The module is not loaded when the interpreter hits that line. It loads when you first access it — np.array(), json.dumps(), anything that uses the name. In real applications, this cuts startup time 50–70% and memory use by up to 40% for code paths that never touch certain imports. One real measurement: 46ms down to 35ms on a mid-sized CLI. Modest in isolation, but across a test suite spawning hundreds of subprocess invocations, it compounds fast.
The catch: use lazy in application entry points, not in libraries. When a library lazily imports its own dependencies, the first call to any library function becomes a hidden import operation — a surprise for callers and a debugging headache. Library authors can use the new __lazy_modules__ module-level declaration to signal to Python 3.15+ that specific imports should be lazy, while older versions safely ignore the declaration.
Tachyon: The Profiler You Can Actually Run in Production
The standard library has had cProfile since Python 2.5. It works by instrumenting every function call and return — a tracing approach that adds significant overhead and can disable the adaptive interpreter optimizations introduced in Python 3.11. In practice, developers use cProfile in development and avoid profiling in production entirely, because the overhead changes the behavior they are trying to observe. Python 3.15 ships a better option.
Tachyon, available at profiling.sampling, is a statistical sampling profiler. Instead of recording every function call, it periodically reads the call stack at up to 1,000,000 samples per second. Functions consuming significant CPU time appear more frequently in collected samples. The overhead is virtually zero — sampling profilers do not interrupt normal interpreter execution between samples. The program runs at full speed.
Two capabilities stand out. First, Tachyon can attach to an already-running Python process via PID with no restart and no code changes:
python -m profiling.sampling --pid 12345 --output flame.svg
Second, it supports async functions, free-threading builds, and multiple threads — none of which cProfile handles cleanly. Output formats include flame graphs, heatmaps, and Firefox Profiler format. GIL analysis and garbage collection tracking are also available. cProfile remains as an alias pointing at profiling.tracing for full backward compatibility.
The practical shift: stop reserving profiling for development. With Tachyon, you can run sampling on your production server, attach to a live process under real load, and generate a flame graph without a performance hit. That is a meaningful change in how Python developers will diagnose slow code.
JIT Compiler: More Coverage, Not Just Better Numbers
Python 3.15 ships a substantially rewritten JIT front end. The previous implementation used a projection-based approach that made guesses about which code paths would run hot. The new front end uses trace recording — a dual-dispatch mechanism where the interpreter switches between normal execution and a tracing mode to capture live runtime data. The result is 50% more JIT code coverage than Python 3.14: generators, custom dunders, and object initialization are now handled where they were not before.
Benchmark numbers: 8–9% geometric mean improvement over standard CPython on x86-64 Linux, 12–13% on Apple Silicon macOS. Some code paths still run up to 15% slower with the JIT enabled, so the flag remains experimental. But the coverage expansion matters more than the headline percentage for real-world codebases full of generators and custom classes — exactly the patterns the previous JIT skipped entirely.
The more significant production unlock is PEP 803: a stable ABI for free-threaded builds (abi3t). Previously, C extensions targeting free-threaded Python had to be rebuilt for every Python minor version, making it impractical for major libraries like SciPy or NumPy to commit to free-threading support. With abi3t, extensions can target free-threaded CPython 3.15+ with a single build. The ecosystem work can now start in earnest.
The Rest: frozendict, sentinel, and Comprehension Unpacking
Three smaller additions round out the release. frozendict is now a built-in: an immutable, hashable dict that can be used as a dictionary key or stored in sets, replacing a third-party package with 2.2 million monthly downloads. sentinel is a new built-in for creating unique sentinel values that are picklable and type-aware — a formal replacement for the _MISSING = object() pattern. And comprehensions now support unpacking:
merged = {**d for d in list_of_dicts}
flattened = [*sub for sub in nested]
frozendict in particular removes a dependency that appears in thousands of projects.
How to Test Python 3.15 Now
Python 3.15 Beta 2 is available on python.org and installable via pyenv install 3.15-dev. The final release is October 1, 2026 — four months to test against your codebase. The highest-value things to try are lazy imports in CLI entry points and running Tachyon against a staging environment to establish performance baselines. The beta is stable enough for experimentation; not stable enough for production.
What This Release Actually Means
Python 3.15 does not fix “Python is slow” — that framing has always been too crude. What it does is close specific gaps that made Python awkward for production tooling: startup latency that made CLIs feel sluggish compared to Go or Rust equivalents, profiling tools too invasive to run live, and a JIT too narrow to deliver consistent gains. The faster CPython initiative has been compounding improvements since 3.11. Python 3.15 is the first release where the new tools — lazy imports, Tachyon, stable free-threading ABI — are production-shaped rather than experimental. Check the official What’s New for the full list, then open beta 2 and start testing.













