jcrist / msgspec

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
https://jcristharif.com/msgspec/
BSD 3-Clause "New" or "Revised" License
2.3k stars 67 forks source link

Fix bug handling default values for frozen & slotted dataclasses #569

Closed jcrist closed 11 months ago

jcrist commented 11 months ago

Previously there was a bug where dataclasses or attrs classes with slots=True, frozen=True wouldn't be able to properly use default values for optional fields.

Fixes #567.