Skip to content

msgspec.structs.fields works on parametrized generics#571

Merged
jcrist merged 1 commit intomainfrom
structs-fields-on-parametrized-generics
Oct 17, 2023
Merged

msgspec.structs.fields works on parametrized generics#571
jcrist merged 1 commit intomainfrom
structs-fields-on-parametrized-generics

Conversation

@jcrist
Copy link
Copy Markdown
Owner

@jcrist jcrist commented Oct 17, 2023

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.

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.
@jcrist jcrist merged commit 31b3fb3 into main Oct 17, 2023
@jcrist jcrist deleted the structs-fields-on-parametrized-generics branch October 17, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: fields API does not support generic Structs if the type is specified

1 participant