Python 3.15: features that didn't make the headlines
The Python 3.15 release, as highlighted in a Hacker News-sourced blog post from changs.co.uk published on 2026-05-21, focuses on less-publicized but impactful features. Among these, `asyncio.TaskGroup` has been refined to support the `async with` statement, ensuring that all tasks within a group are properly completed or cancelled upon exiting the block, which enhances the robustness of asynchronous applications. This improvement addresses common pitfalls in concurrent programming by simplifying resource management and error handling. Another notable enhancement is to `typing.Annotated`, which now permits multiple annotations to be applied to a single type. This allows for more granular and expressive type hints, enabling developers to attach richer metadata to their code without altering the underlying type. Furthermore, Python 3.15 introduces the `sys.monitoring` API, a new interface designed to expose CPython's internal events. This API offers a low-level mechanism for tools to monitor execution, object creation, and other runtime behaviors, paving the way for advanced profiling, debugging, and performance analysis utilities.
Developers gain more robust asynchronous programming tools, expressive type hinting, and deeper insights into runtime behavior for better debugging.