Fundamentals 6 min read

What’s New in Python 3.15 Alpha 3? Profiling, UTF‑8 Default, and Error Message Improvements

Python 3.15.0 alpha 3, the third of seven planned pre‑release versions, introduces a high‑frequency low‑overhead statistical profiler, makes UTF‑8 the default source encoding, adds a new C‑API for byte objects, and delivers clearer error messages, all while remaining a test‑only build.

21CTO
21CTO
21CTO
What’s New in Python 3.15 Alpha 3? Profiling, UTF‑8 Default, and Error Message Improvements

Release overview

Python 3.15.0a3 is the third of seven planned alpha releases for the upcoming 3.15 series. It is a test build intended for extensive testing of new functionality and for planning library support. It is not suitable for production use.

Statistical sampling profiler (PEP 799)

PEP 799 introduces a new standard‑library module profiling with a submodule profiling.sampling. The module implements a high‑frequency, low‑overhead statistical sampler that periodically interrupts the running process, records the current call stack, and aggregates the data into a time‑based statistical profile. Unlike the traditional tracing profilers cProfile and profile, which instrument every function call, the sampler adds only a tiny overhead and can be attached to a live process.

Key capabilities:

External attachment to a running Python process.

Works across multiple threads and with asynchronous code.

Can emit flame‑graph‑compatible output (e.g., --format=flamegraph) for visualization with tools such as flamegraph.pl or speedscope.

Typical command‑line usage:

python -m profiling.sampling --interval=0.001 --output=profile.txt my_script.py

The --interval flag controls the sampling period (seconds), and --output selects the destination file. The generated file can be processed with the profiling analysis package to produce text, JSON, or flame‑graph output.

Other major changes

PEP 686 : UTF‑8 becomes the default source‑code encoding for all Python files, eliminating the need for an explicit # -*- coding: utf-8 -*- header.

PEP 782 : Introduces PyBytesWriter, a new C‑API that simplifies creation of bytes objects from native buffers and improves performance of byte‑object construction.

Improved error messages: tracebacks now include more context, clearer wording, and suggestions for common fixes, making debugging faster.

Release schedule and cautions

The alpha series is used to validate new features and the release process. The schedule is:

Alpha 1 – released

Alpha 2 – released

Alpha 3 – this release (2024‑10‑xx)

Alpha 4 – planned for 2025‑01‑13

Beta phase begins on 5 May 2026.

Release candidate expected around 28 July 2026.

Features may be added, modified, or removed until the beta phase. Users should not deploy this version in production environments.

Download and further resources

Preview download: https://www.python.org/downloads/release/python-3150a3/

Online documentation (What’s New in 3.15): https://docs.python.org/3.15/whatsnew/3.15.html

Full 3.15 documentation: https://docs.python.org/3.15/

PEP 799 details: https://peps.python.org/pep-0799/

PEP 686 details: https://peps.python.org/pep-0686/

PEP 782 details: https://peps.python.org/pep-0782/

Release schedule (PEP 790): https://peps.python.org/pep-0790/

Issue tracker for bug reports: https://github.com/python/cpython/issues

PythonUTF-8profilingAlpha ReleaseError MessagesPEP 799
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.