The October 9 release brings explicit lazy imports, an immutable dictionary, UTF-8 by default and a new sampling profiler that attaches to running processes. It also brings the usual upgrade homework.
In 60 seconds
- Python 3.15.0 shipped on October 9, 2026, built from 5,643 commits by 1,012 contributors.
- Headline features include explicit lazy imports, a frozendict built-in, a sentinel type, UTF-8 as the default encoding and the Tachyon sampling profiler.
- Free-threaded builds gain a stable ABI, frame pointers are on by default, and the old profile module is deprecated for removal in 3.17.
Every autumn, Python’s core developers publish the next major release of one of the most widely used programming languages in the world, and every autumn the community argues about what mattered most. This year, the release arrived on October 9, 2026, and the argument is easier than usual. Python 3.15 contains a handful of features that directly address long-standing complaints about startup time, mutability, profiling and text encoding.
The release was assembled from 5,643 commits by 1,012 contributors, which gives a sense of the project’s scale. This article walks through the changes that most developers will notice, the ones that matter to library maintainers, and the practical steps to take before moving a production system.
The headline features
Python’s own summary lists several major changes: explicit lazy imports, the frozendict and sentinel built-ins, UTF-8 as the default encoding, unpacking in comprehensions, and a stable ABI for free-threaded builds. On the library side, there is a new profiling package that includes a high-frequency sampling profiler called Tachyon, along with more color in command-line output and the usual round of deprecations and removals.
Other changes are quieter but meaningful. Frame pointers are now enabled by default to improve system-level observability, the typing system gains new features, and the official Windows 64-bit binaries now use the tail-calling interpreter. Official macOS binaries install free-threading support by default. A package startup configuration file mechanism has also been added, and the C API gains a new tool for building bytes objects.
Lazy imports: pay only for what you use
Large Python applications often start slowly. A major reason is the import system: when a module is imported, Python has to locate the file, read it, compile it to bytecode and execute its top-level code. For applications with deep dependency trees, that process can consume seconds, even when most of the imported code is never used during a particular run.
Developers have long worked around the problem by moving imports inside functions, loading modules on demand with importlib or restructuring code to avoid dependencies. Those tricks work, but they scatter imports across a codebase and make it harder to read. Python 3.15 offers a cleaner answer through a new lazy soft keyword. When you write lazy import json, Python does not load the module immediately. It creates a lightweight proxy, and the real import happens transparently the first time the name is used.
The feature works with both import and from-import statements. There are some careful boundaries: wildcard imports and future imports cannot be lazy, and attempting them raises a syntax error. If a lazily imported module fails to load, the exception is raised at the point of first use rather than at import time, and the traceback shows both the use site and the original import statement. For code that must still support older Python versions, a module can define a special list of lazy module names, and for experimentation there is a command-line option and an environment variable that make imports lazy by default.
The best startup optimization is the work you never do. Lazy imports turn that into a keyword.
frozendict and sentinel: small types, big relief
Python 3.15 adds frozendict as a built-in type. It is an immutable mapping: once created, it cannot be changed, and attempts to assign a key raise a TypeError. Two frozendicts with the same contents compare equal and hash equally, so they can be used as dictionary keys or stored in sets. Notably, a frozendict is not a subclass of dict, which avoids a family of subtle bugs where code assumes that every dict can be mutated.
This addresses an old need. Developers have long built immutable mappings out of tuples, custom classes or third-party packages. Having one in the standard library makes configuration objects, cache keys and shared constants safer, particularly in concurrent code where accidental mutation causes the hardest bugs to diagnose.
A new sentinel type, also in the built-ins, tackles another recurring pattern. Libraries often need a unique placeholder value that is distinct from None, such as a marker for no argument supplied. Developers usually create one with a bare object instance, which has an unhelpful representation and can break when copied. The new type produces sentinels with concise representations, preserves identity when copied and can be used in type expressions.
UTF-8 by default
One of the most consequential changes is also one of the least flashy. Python 3.15 makes UTF-8 the default encoding. For years, the language relied on the locale’s preferred encoding when opening text files without an explicit encoding argument, which led to programs behaving differently across Windows, Linux and macOS and to the notorious bugs that appear when a script written on one machine meets a file created on another.
Making UTF-8 the default reduces that friction and aligns Python with how most modern text is stored. For most projects, the change will be invisible or beneficial. For teams that depend on legacy encodings, especially in Windows environments or with older data files, it deserves a careful test pass. Search your code for file operations that omit an encoding argument, and add an explicit encoding where the data is not UTF-8.
Tachyon and the new profiling package
Performance analysis gets a significant upgrade through PEP 799, which organizes Python’s built-in profiling tools under a single profiling package. It contains a tracing profiler, relocated from the familiar cProfile module, and a new statistical sampling profiler named Tachyon. The cProfile name remains as an alias for backward compatibility. The older profile module is deprecated and slated for removal in Python 3.17.
Tachyon is designed for low-overhead analysis of running Python processes without changing code or restarting. It can attach to a live process, and documentation cites sampling rates up to 1,000,000 hertz, describing it as the fastest sampling profiler available for Python at the time it was contributed. That matters for production debugging, where traditional profilers add so much overhead that they change the behavior being measured or are simply too risky to run.
Pairing Tachyon with frame pointers enabled by default makes the story stronger. System-level tools such as Linux profilers and tracing frameworks can walk Python and native stacks more reliably, which gives operations teams better visibility into where time is actually spent.
| Feature | What it does | Who benefits most |
|---|---|---|
| Explicit lazy imports | Defers module loading until first use | Applications and CLIs with slow startup |
| frozendict | Immutable, hashable mapping built in | Configuration, caching and concurrent code |
| sentinel | Unique placeholder values with clean behavior | Library and API authors |
| UTF-8 default encoding | Consistent text file behavior across platforms | Cross-platform teams, data pipelines |
| Tachyon profiler | Low-overhead sampling of live processes | Performance engineers, SREs |
| Stable ABI for free-threaded builds | Extensions can target free-threaded Python more stably | Extension and scientific library maintainers |
| Frame pointers by default | Better stack walking for system tools | Observability and profiling users |
Free threading and the stable ABI
Python’s experimental move toward removing the global interpreter lock has been one of the biggest stories of the past several releases. Python 3.15 advances it by providing a stable ABI for free-threaded builds, covered by several enhancement proposals. For ordinary users this is invisible. For maintainers of compiled extensions, it is significant. A stable ABI means a library can build one binary that works across multiple free-threaded Python versions, rather than rebuilding for every release.
That reduces the friction that has kept many packages from supporting free-threaded Python. Official macOS binaries now install free-threading support by default, and the Windows binaries use the tail-calling interpreter, which can improve speed. Neither change means you should flip your production workloads to free-threaded mode today. Library compatibility is still uneven, and thread-safety bugs that were hidden by the lock can emerge. But the ecosystem is clearly moving.
Typing and smaller language changes
Type annotations get two notable additions. TypedDict can now describe typed extra items, which helps when a dictionary has a fixed set of known keys plus additional keys of a specific type, and a new TypeForm feature allows annotating values that represent types themselves. These are valuable to framework and validation library authors, and they continue Python’s steady progress toward more expressive static typing.
The release also expands unpacking in comprehensions, adds more color to command-line output and includes the usual improvements in user-friendliness and correctness. One note from the release page is aimed at a narrow audience: users of IDLE or tkinter on macOS 27 should read the release’s attention notice before upgrading, since compatibility details are documented there.
How to upgrade without surprises
A major Python release is rarely a drop-in change for large projects. The most reliable approach is to add Python 3.15 to your continuous integration matrix now, run your tests under warnings-as-errors and read the porting guide. Check dependencies as well: compiled packages need wheels for 3.15, and some may lag.
- Add Python 3.15 to your CI matrix and run the full test suite with deprecation warnings enabled.
- Search for file operations without an explicit encoding argument, and test them under UTF-8 as the default.
- Replace uses of the old profile module with the new profiling package, since profile is scheduled for removal in 3.17.
- Try lazy imports on your slowest-starting command-line tools and measure startup time before and after.
- Evaluate frozendict for configuration objects and cache keys, but keep dict where mutation is intended.
- Check that every compiled dependency publishes wheels for Python 3.15 before upgrading production.
- Treat free-threaded builds as an experiment, with separate test environments and thread-safety review.
- Read the porting guide and the macOS notes if you use IDLE or tkinter.
What this means for teams and the ecosystem
For application developers, the practical gains are startup speed, safer data structures and better production profiling. For library authors, the stable ABI and the sentinel and frozendict types remove awkward workarounds. For operations teams, Tachyon and default frame pointers promise easier diagnosis of slow code in real environments.
There is a strategic dimension too. Python remains the default language for data science, automation and machine learning, and it continues to compete with newer languages that promise speed and safety. Features like lazy imports and free-threading address the criticisms most often leveled at it. They do not make Python a systems language, but they narrow the gap in the places where Python is actually used.
What to watch next
Watch the first maintenance releases, which usually fix issues discovered after general availability. Watch the major libraries, such as scientific and web frameworks, as they publish 3.15 wheels and free-threading support. Watch the adoption of lazy imports in popular tools, because wide use would change how Python programs are structured. And watch the removal schedule: with the old profiling module headed for deletion in 3.17, the migration window is already open.
Python 3.15 is a release for people who run Python rather than only write it. Lazy imports and Tachyon address the pain of slow startup and opaque production performance, while UTF-8 by default and frozendict remove classes of bugs that have cost teams real time.
The sensible plan is simple. Test now, adopt the profiler and lazy imports where they help, treat free threading as promising but experimental, and schedule the production move once your dependencies are ready. It is an upgrade worth planning, not rushing.
Sources & further reading
- Python.org – Python 3.15.0 release page
- Python documentation – What’s new in Python 3.15
- InfoWorld – Go hands-on with Python 3.15
Compiled by the Degoot Team from public reporting available at the time of writing. Figures and timelines may change as vendors and investigators publish updates, so check primary sources before acting.
Software News · degoot.com
