Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msgspec.structs.fields works on parametrized generics #571

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

jcrist
Copy link
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
7 checks passed
@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