mirror of
https://github.com/python/cpython.git
synced 2025-10-28 20:25:04 +00:00
gh-135228: When @dataclass(slots=True) replaces a dataclass, make the original class collectible (GH-136893)
An interesting hack, but more localized in scope than GH-135230.
This may be a breaking change if people intentionally keep the original class around
when using `@dataclass(slots=True)`, and then use `__dict__` or `__weakref__` on the
original class.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| dataclass_module_1.py | ||
| dataclass_module_1_str.py | ||
| dataclass_module_2.py | ||
| dataclass_module_2_str.py | ||
| dataclass_textanno.py | ||