Skip to content

Commit b8515f6

Browse files
Reword news entry
1 parent d3ed33a commit b8515f6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
When both *frozen* and *slots* are set to ``True``
2-
in :func:`~dataclasses.dataclass`, added methods
3-
``__setattr__`` and ``__delattr__`` were still referencing the original class,
4-
preventing it from being garbage collected and causing unexpected exceptions.
1+
Attempting to mutate non-field attributes of :mod:`dataclasses`
2+
with both *frozen* and *slots* being ``True`` now raises
3+
:class:`~dataclasses.FrozenInstanceError` instead of :class:`TypeError`.
4+
Their non-dataclass subclasses can now freely mutate non-field attributes,
5+
and the original non-slotted class can be garbage collected.

0 commit comments

Comments
 (0)