You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: dataclass with frozen and slots fails if defaults not provided #567
Traceback (most recent call last):
File "~/foo.py", line 9, in <module>
foo = msgspec.convert({}, Foo)
^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'foo_value'
If the value for foo_value is provided in the initial dictionary, there is no error. Also, the error is only raised if slots=True is present.
Activity
jcrist commentedon Oct 17, 2023
Thanks for the excellent reproducible issue, this has been resolved in #569. I'll try to make a release in the next week or so.