Python 3.15 ships, making UTF-8 the default on all platforms

Release adds a profiler, experimental JIT compiler and Lazy Import option after a week-long delay

By LineZotpaper
Published
Read Time2 min
Python 3.15 has been released after a week's delay, with default UTF-8 encoding support across all platforms headlining a release that also adds a new profiler, an experimental just-in-time compiler, tightened dictionary structures, and a Lazy Import option.

Python 3.15 has shipped after a week-long delay, making UTF-8 the default encoding on every platform it supports. The change removes a long-standing headache for Windows developers, whose scripts previously defaulted to the host system's locale encoding and could corrupt or crash when confronted with non-ASCII characters such as smart quotes or fancy apostrophes in UTF-8-encoded data sets.

UTF-8 is an 8-bit binary encoding of the Unicode catalog, managed by The Unicode Consortium with help from the IETF and ISO. Where ASCII offered 128 characters, UTF-8 provides more than 1.1 million slots, covering emojis, mathematical and musical notation, Chinese dialects, and even extinct languages. Its combination of efficiency and inclusiveness made it the default for the web and most modern operating systems.

Python lagged behind other languages. PEP 681, the proposal to make UTF-8 the preferred encoding, was put forward in 2022, after Java's JDK 18 and Ruby 3.0 had already defaulted to it. Rust, Go, and Node.js use UTF-8, and data formats such as JSON, TOML, and YAML require 8-bit encodings. Previously, Python programmers had to add a flag to their code to use UTF-8, and many did not, producing scripts that worked on macOS or Linux but failed on Windows.

The release also includes a new profiler, a tightening of dictionary structures, an experimental just-in-time compiler, and a Lazy Import option that defers loading modules until they are needed. The Lazy Import implementation ironically caused the week's delay while last-minute regressions were sorted out.

The encoding change matters to a large share of the community. About half of all Python developers use the language for processing and analysing data, and roughly 58 percent build on Windows, according to Python Software Foundation surveys.

To help developers explore the new features, longtime Python programmer Barry Warsaw has created a terminal-based adventure game called 'whatsnewt', offering 18 puzzles, each built on a new feature. The UTF-8 puzzle is titled 'The Encoding Tower of Babel'. It can be installed with 'pip install whatsnewt' and runs on the Python command line, including on Windows.

§

Analysis

Why This Matters

  • Default UTF-8 removes a whole class of crashes and corrupted output for the roughly 58 percent of Python developers who build on Windows, where locale-based encoding was the usual culprit.
  • It brings Python into line with the rest of the modern ecosystem, from web standards to JSON, YAML, and rival languages such as Java and Go, making cross-platform data work more predictable.
  • The experimental just-in-time compiler is a first step toward faster Python programs, which matters for the data processing workloads that about half of the community runs.

Background

Python is a general-purpose programming language that has become a cornerstone of data science, web development, and automation since its creation in the early 1990s, prized for its readable syntax and vast ecosystem of libraries. UTF-8 has long been the dominant encoding of the web: a variable-width scheme that represents the full Unicode standard while remaining compatible with ASCII, which is why operating systems and file formats adopted it as a default years before Python did. The 3.15 change ends an era in which Python's behaviour depended on the host machine's locale, a design that predated today's globally shared text environment.

Key Perspectives

Windows developers: The clearest winners. Their scripts will now handle UTF-8 data out of the box, without the failure mode in which a single smart quote could crash a data pipeline.

Data practitioners: About half of Python users process and analyse data, often drawn from files and APIs that assume UTF-8. The new default removes a silent corruption risk that could surface only when a script was deployed to a different machine.

Critics and sceptics: The release was not entirely smooth. The Lazy Import feature introduced regressions that pushed the launch back a week, a reminder that changing core runtime behaviour carries risk. An experimental JIT compiler will also need to prove it can be stable and efficient in production before it becomes a default.

What to Watch

  • Reports from Windows users of any encoding-related regressions in the first 3.15.x point releases.
  • Whether the experimental just-in-time compiler advances toward a stable state in future Python versions.
  • Whether Lazy Import, having already delayed the release once, settles down without further incidents.

Sources

Zotpaper

Written by software from the reporting listed above, scored by an automated standards desk, and published without a person reading it first. If something here is wrong, tell the editor and it will be put right.

How we workSubscribe