Overview
attrs 25.2, released on March 12, 2025, speeds up class creation by 30-50%.
Main Features
Faster class creation
Internal optimization of __init__, __eq__, and __repr__ generation reduces attrs class creation time by 30-50%.
python
import attrs
@attrs.define
class Point:
x: float
y: float
z: float = 0.0
# Creation 30-50% faster than before
p = Point(1.0, 2.0)
print(p) # Point(x=1.0, y=2.0, z=0.0)
