[issue46404] 3.11a4: a small attrs regression

Lumír Balhar report at bugs.python.org
Tue Mar 15 16:17:55 EDT 2022


Lumír Balhar <frenzy.madness at gmail.com> added the comment:

In my opinion, we should keep it simple for attrs and dataclasses to fix closure cells when a class is replaced and therefore it seems to be correct to have it mutable as it currently is in 3.11.

My plan is to implement the fix for dataclasses and some tests for these use cases so the behavior should not change in the future. For attrs it means one more branch in the code now but much simpler code when the support for older releases gets dropped.

Any other opinions?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46404>
_______________________________________


More information about the Python-bugs-list mailing list