Message397799
Using a frozendict as a default value should not cause an error in dataclasses. The check for mutability is:
isinstance(f.default, (list, dict, set))
It appears frozendict has been changed to have a dict base class and it now raises an exception.
There should be a way to indicate object mutability as the purpose of the isinstance(f.default, (list, dict, set)) check is for mutable default values.
Using default_factory to work around this issue is cumbersome. |
|
Date |
User |
Action |
Args |
2021-07-19 14:06:32 | gianni | set | recipients:
+ gianni |
2021-07-19 14:06:32 | gianni | set | messageid: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org> |
2021-07-19 14:06:32 | gianni | link | issue44674 messages |
2021-07-19 14:06:32 | gianni | create | |
|