4 min read
Speaker presenting at PyCon Asia Pacific in a university seminar room in Singapore, with two projection screens and attendees at laptops
Image credits · Photo: Malcolm Tredinnick / CC BY 2.0, via Wikimedia Commons

Python 3.15 Is Out: Faster JIT, Lazy Imports and UTF-8 by Default

The UTF-8 default is the change most likely to surprise existing scripts, while lazy imports and a new sampling profiler target slow startup and hard-to-find bottlenecks.

In short

Python 3.15 was released on 9 October 2026. It adds explicit lazy imports, a built-in frozendict, UTF-8 as the default encoding, the Tachyon sampling profiler and a faster experimental JIT, which shows a 7 to 8 percent gain on x86-64 Linux. It gets security fixes until October 2031.

Table of contents 6 sections
Key takeaways
  • Python 3.15.0 was released on 9 October 2026, with bugfix releases 3.15.1 and 3.15.2 following in October.
  • Python now uses UTF-8 as the default encoding, which can affect scripts that relied on legacy Windows code pages.
  • The experimental JIT shows a 7 to 8 percent geometric mean gain on x86-64 Linux and 11 to 12 percent on AArch64 macOS.
  • New features include explicit lazy imports, a frozendict built-in and the Tachyon sampling profiler.
  • Python 3.10 reached end of life on 1 October 2026, while 3.15 gets security fixes until October 2031.

Python 3.15 was released on 9 October 2026, and the change most likely to break something is the least glamorous one: Python now uses UTF-8 as its default text encoding on every platform. The release also adds explicit lazy imports, a built-in frozendict type, a high-frequency sampling profiler and an experimental JIT compiler that the core team says is now measurably faster.

Two bugfix releases have already followed. Python 3.15.1 arrived on 21 October and 3.15.2 late in the month, according to the release schedule in PEP 790, which is normal for a new major version as early adopters report problems.

What is new in Python 3.15

The official release page lists a long set of changes. The ones most developers will notice:

  • Explicit lazy imports (PEP 810): a new lazy soft keyword, as in lazy import json, defers loading a module until the code first uses it.
  • frozendict (PEP 814): a built-in immutable mapping that is hashable when its keys and values are.
  • UTF-8 by default (PEP 686): text files opened without an explicit encoding now use UTF-8, regardless of the system locale.
  • Tachyon profiler (PEP 799): a statistical sampling profiler in a new profiling package.
  • A sentinel built-in (PEP 661) and unpacking inside comprehensions (PEP 798).
  • Typing additions: TypedDict with typed extra items (PEP 728) and TypeForm annotations (PEP 747).

How much faster is the JIT?

The release page describes the experimental JIT as significantly upgraded, and it puts a number on the gain: a 7 to 8 percent geometric mean improvement over the standard interpreter on x86-64 Linux, and an 11 to 12 percent speedup over the tail-calling interpreter on AArch64 macOS, which covers Apple silicon Macs.

Those are geometric means across a benchmark suite, so individual programs will see more or less, and the JIT is still labelled experimental. For teams chasing speed, the more immediately useful tool may be Tachyon, which the What's New document says can sample running Python processes at up to 1,000,000 Hz without code changes, in wall-clock, CPU or GIL modes.

Why lazy imports matter for command-line tools

Slow startup is a familiar complaint about Python command-line tools, because importing a big library tree costs time even when a given command never touches most of it. Lazy imports let authors mark heavy dependencies so they load only when used. The documentation's own example imports json and pathlib lazily and prints a startup message before either module is fully loaded.

The feature is opt-in per import, and can also be enabled globally with the -X lazy_imports option or the PYTHON_LAZY_IMPORTS environment variable. The What's New page gives no benchmark for it, so the gain will depend entirely on how much a program imports at startup.

The UTF-8 change: check your scripts

Systems whose locale already used UTF-8 should see no difference. The risk sits on machines with a different system encoding, such as Windows PCs using a legacy code page, where code that called open() without an encoding argument quietly relied on a legacy code page. On Python 3.15 the same call reads and writes UTF-8.

The fix is simple once you know to look: pass encoding= explicitly wherever a file format depends on a legacy encoding. If you need the old behaviour while you sort it out, the documentation says setting PYTHONUTF8=0 or running with -X utf8=0 restores it.

Free-threading and extensions

Python's optional build without the global interpreter lock gets a practical boost. A new stable ABI for free-threaded builds, called abi3t, lets C extension authors compile once for free-threaded CPython instead of building per version. The official macOS installers now include free-threading support by default. That should make it easier for library maintainers to ship packages that work on the GIL-free build, which matters because a free-threaded interpreter is only useful if your dependencies load on it.

A few older pieces are on their way out. The profile module is deprecated and scheduled for removal in Python 3.17, with the new profiling package as its replacement.

Should you upgrade to Python 3.15 now?

For new projects and personal tools, yes, once your key libraries publish 3.15 wheels. For production services, the usual approach applies: test on 3.15.2 or later in CI, fix encoding warnings, and wait for your framework's release notes to confirm support.

The support window is long. PEP 790 schedules regular bugfix releases roughly every two months until October 2028, and source-only security fixes until October 2031. Older versions are the ones to worry about: python.org lists Python 3.10 as end-of-life since 1 October 2026, so anything still running it no longer gets security patches. If you deploy on a managed runtime, check when your platform adds 3.15 and drops 3.10; our explainer on IaaS, PaaS and SaaS covers who controls those choices.

The next milestone is the Python 3.16 alpha series, and with it the question of whether the JIT moves from experimental to something the core team recommends turning on.

Frequently asked

Sources
  1. Python Release Python 3.15.0 — Python Software Foundation
  2. What's New In Python 3.15 — Python Documentation
  3. PEP 790: Python 3.15 Release Schedule — Python Enhancement Proposals
Written by Said Dulevic

Our international desk covers the infrastructure, policy and people behind the technology shaping the world. Tips and corrections: newsroom@globalpulsedaily.com

More from this author

0 comments

Never published.
A quick check that you are not a script.
Comments are moderated. Links, contact details and abuse are removed.

No comments yet — be the first.