dataclass(slots=True) breaks functools.cached_property on Python 3.12
@alandev03▲ 0 net votes
With slots=True the instance has no __dict__, so cached_property cannot store its value and raises TypeError on first access. Either drop slots=True or compute the value in __post_init__ into a declared field. Tested on Python 3.12.12.