deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Python 3.15 reaches release candidate with lazy imports and faster startup

Python 3.15's first release candidate lands with lazy imports for faster startup, UTF-8 as the default encoding, a built-in immutable dict, JIT gains and the new Tachyon profiler ahead of the October 1 release.

Python 3.15 reaches release candidate with lazy imports and faster startup

Python 3.15 has reached its first release candidate, with the final release expected on October 1, 2026, according to a dev.to post that walks through the changes. The overall picture the author paints is an evolutionary release: most of the work targets performance, tooling and long-standing friction points rather than changing how the language is written.

Lazy imports aim at startup time

The most immediately practical change is lazy imports. Under this behaviour, some modules are loaded only when the code actually uses them rather than up front at startup. According to the dev.to summary, this should benefit applications and command-line tools that spend a noticeable slice of their early runtime importing modules before doing any real work.

The author also raises an open question: whether lazy imports cause compatibility problems with existing projects, and asks developers who have been testing the beta or RC to share their experience.

UTF-8 set as the default encoding

Python 3.15 makes UTF-8 the default encoding. The dev.to post frames this as a way to cut down on encoding-related bugs, particularly the familiar failure mode where code runs fine on one machine and then breaks on another because the system encoding differs. Consistent behaviour across operating systems should make those cross-platform surprises less common.

A built-in immutable dictionary

The language gains a built-in immutable mapping, described as frozendict-style. The analogy used is tuples versus lists: just as a tuple offers an unchangeable alternative to a list, the new type gives developers a standard way to hold dictionary data that cannot be modified after creation, without reaching for third-party libraries.

JIT gains and the Tachyon profiler

The JIT compiler continues to improve. Early benchmarks cited in the dev.to summary point to gains of roughly 8–9% on Linux, with larger improvements in some Apple Silicon tests. The author cautions that the numbers depend heavily on the workload and that broader conclusions should wait on further benchmarking.

On the diagnostics side, 3.15 introduces Tachyon, a new sampling profiler focused on keeping overhead very low. It can sample a running program at very high frequencies, and notably it can attach to a process that is already running. That means performance problems can be investigated without having to restart an application with a profiler attached from the start.

Terminal polish and free-threading status

The interactive interpreter gets a handful of smaller improvements, including colored error messages and prompts, while the sqlite3 command-line interface picks up SQL keyword completion.

Free-threaded Python, the build without the global interpreter lock, remains opt-in and is not the default in 3.15. It is, however, becoming more mature: the dev.to post points to improved ABI support that should make it easier for C extension developers to back it.

Because the release is already at RC1, the feature set is considered mostly locked, with the remaining work expected to be bug fixes and final polishing ahead of October.

Why it matters

Slow startup is one of the most common complaints about Python command-line tools, so lazy imports could produce an improvement users actually feel day to day. Defaulting to UTF-8 removes a recurring source of cross-platform bugs that has caught out plenty of teams. A low-overhead profiler that attaches to live processes fills a real operational gap, since performance issues in long-running services are otherwise hard to inspect without a restart under instrumentation. Individually these are modest changes, but together they chip away at friction that has persisted for years. The RC period is also the practical window for maintainers to check whether lazy imports interact badly with import-time side effects in their packages before the final release lands.

  • #python
  • #performance
  • #release-candidate
  • #programming-languages