mirror of
https://github.com/python/cpython.git
synced 2026-05-07 13:10:37 -04:00
ce79154176
The dataclasses `__init__` function is generated dynamically by a call to `exec()` and so doesn't have deferred reference counting enabled. Enable deferred reference counting on functions when assigned as an attribute to type objects to avoid reference count contention when creating dataclass instances.