Python Releases

Python 3.12 - October 2, 2023

Summary – Release highlights

The library changes focus on cleaning up deprecated APIs, usability, and correctness.

The language changes focus on usability, as f-strings have had many limitations 
removed and ‘Did you mean …’ suggestions continue to improve. The new type parameter 
syntax and type statement improve ergonomics for using generic types and type aliases 
with static type checkers.

Python 3.11 - October 24, 2022

Summary – Release highlights

Python 3.11 is between 10-60% faster than Python 3.10.

New syntax features:

PEP 654: Exception Groups and except*

New built-in features:

PEP 678: Exceptions can be enriched with notes

New standard library modules:

PEP 680: tomllib — Support for parsing TOML in the Standard Library

Python 3.10 - October 04, 2021

New syntax features:

PEP 634, Structural Pattern Matching

bpo-12782, Parenthesized context managers are now officially allowed.

New features in the standard library:

PEP 618, Add Optional Length-Checking To zip.

Python 3.9 - October 05, 2020

New syntax features:

PEP 584, union operators added to dict;

PEP 585, type hinting generics in standard collections;

PEP 614, relaxed grammar restrictions on decorators.

Warning

Python 3.9.4 is a hotfix release addressing an unintentional ABI incompatibility introduced in Python 3.9.3. Upgrading is highly recommended to all users.

Python 3.8 - October 14th, 2019

New Features

Assignment expressions
:=  “the walrus operator”

Positional-only parameters

f-strings support = for self-documenting expressions and debugging

Python 3.7 - June 27, 2018

New syntax features:

PEP 563, postponed evaluation of type annotations.

Backwards incompatible syntax changes:

async and await are now reserved keywords.

New library modules:

contextvars: PEP 567 – Context Variables

dataclasses: PEP 557 – Data Classes

importlib.resources

New built-in features:

PEP 553, the new breakpoint() function.

Python 3.6 - December 23, 2016

New syntax features:

PEP 498, formatted string literals.

PEP 515, underscores in numeric literals.

PEP 526, syntax for variable annotations.

PEP 525, asynchronous generators.

PEP 530: asynchronous comprehensions.

New library modules:

secrets: PEP 506 – Adding A Secrets Module To The Standard Library.

Python 3.5 - September 13, 2015

New syntax features:

PEP 492, coroutines with async and await syntax.

PEP 465, a new matrix multiplication operator: a @ b.

PEP 448, additional unpacking generalizations.

References