3.15.0a1

Latest release in branch 3.15
Released 21 days ago (October 14, 2025)

Software Python
Branch 3.15
Status
Alpha

Python 3.15 Release Notes

The Python 3.15 release brings a number of meaningful improvements over version 3.14. Highlights include a high-frequency sampling profiler, UTF-8 set as the default encoding for I/O, a new low-level C API for building bytes objects, and more helpful error messages. The update also introduces various improvements across modules and the C-API.

Summary – Release Highlights

  • PEP 799: A dedicated sampling profiler for performance analysis without modifying source code.
  • PEP 686: UTF-8 becomes the default encoding when no other encoding is specified.
  • PEP 782: Introduction of the PyBytesWriter C API for efficient bytes object creation.
  • Improved error messages: when an attribute is missing but a similar attribute exists, Python suggests the correct name.

New Core Features

Important new capabilities include:

  • Sampling profiler: Introduced as profiling.sampling. This profiler can attach to a running process with very low overhead (sampling rates up to around 1 000 000 Hz), without needing to restart or modify the code.
  • UTF-8 default encoding: When opening files or performing I/O without specifying an encoding, UTF-8 will now be used by default, improving portability and consistency across platforms.
  • Bytes object building API: The new PyBytesWriter set of functions (e.g., PyBytesWriter_Create(), PyBytesWriter_WriteBytes()) allows C-extensions to build bytes objects more efficiently.
  • Better diagnostics: Error messages have been improved. For example, when you attempt to access a non-existent attribute but a similar one exists in a member object, Python now suggests the correct attribute name.

Other Significant Changes

Python 3.15 also includes many refinements across the standard library and internal APIs:

  • Improvements in modules such as calendar, collections, hashlib, sqlite3, among others.
  • Removal or deprecation of old or undocumented APIs (for example, collections.abc.ByteString has been removed from collections.abc.__all__, scheduled for full removal in future versions).
  • C API changes and cleanup: underlying extension APIs have been updated (such as new functions replacing older ones in PyUnicode or PyImport), aiding future compatibility and performance.

Deprecations & Removals

Developers should take note of several deprecated or removed features:

  • Some deprecated modules and functions are removed or flagged for future removal (for example old NamedTuple syntax, certain zipimport methods).
  • C API cleanup means some older extension functions are no longer available or recommended, and migration to newer APIs is encouraged.

Conclusion

With Python 3.15, the language moves forward in terms of performance tooling, cross-platform consistency, and diagnostics. The defaulting to UTF-8, improved profiling tools, and refined C-APIs help both everyday application developers and extension developers. Although some backward-incompatible changes and removals are included, the release is well-suited for writing safer, more portable and higher-performing Python code.

Releases In Branch 3.15

Version Release date
3.15.0a1 21 days ago
(October 14, 2025)