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

`msgspec.structs.fields` works on parametrized generics #571

Closed jcrist closed 11 months ago

jcrist commented 11 months ago

Previously msgspec.structs.fields only worked on struct instances or types. We now also support parametrized generic struct types, so msgspec.structs.fields(MyStruct[int]) also works.

Fixes #570.