Python 3.7 Release History
Python 3.7 (released June 27, 2018) introduced major usability improvements, formalized key language behaviors, and improved support for modern async Python.
Data Classes (@dataclass)
The highlight of Python 3.7 is PEP 557: dataclasses.
They remove boilerplate when creating data containers:
from dataclasses import dataclass
@dataclass
class User:
username: str
is_admin: bool = False
Automatically generated methods:
__init____repr____eq__
Dictionaries Preserve Insertion Order
In Python 3.7, dict order preservation became a language guarantee:
data = {"a": 1, "b": 2, "c": 3}
print(list(data.keys()))
# ['a', 'b', 'c']
Before 3.7 this was implementation detail — now it is official behavior.
Built-in Debugger Hook (breakpoint())
PEP 553 introduced:
breakpoint()
- replaces
pdb.set_trace() - configurable via
PYTHONBREAKPOINT - supports custom debuggers
Context Variables (contextvars)
PEP 567 added context-local state management:
- designed for async/await
- safer alternative to thread-local storage
Typing Improvements
- deeper integration of
typinginto interpreter - improved generic type support (PEP 560)
- foundation for modern static typing ecosystem
Standard Library Updates
contextvarsimportlib.resources- improvements to
asyncio
Interpreter Improvements
- faster imports
- improved garbage collection behavior
- better async execution performance
- improved C extension initialization
Language Changes
asyncandawaitbecame reserved keywords- improved warning system
- groundwork for future backward-incompatible improvements
Subversions log
- 3.7.17 (Jun 2023) — final security-only release (EOL)
- 3.7.16 (2022) — security fixes
- 3.7.10 (May 2021) — critical patches
- 3.7.0 (June 2018) — initial release