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.45k stars 76 forks source link

Support inheriting from slots classes with gc=False #635

Closed jcrist closed 10 months ago

jcrist commented 10 months ago

Previously we prevented setting gc=False when inheriting from any non-Struct type. In reality this is safe to set when inheriting from any non-c-extension class lacking a __dict__.

Fixes #631.