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.