Member
Allow msgspec.structs.field on types that use metaclass=StructMeta.
Fixes #941.
Member
Thanks! Have you confirmed that this also fixes the second comment in that issue? It appears to be a different error.
Member Author
Ah, I didn't see that a second comment was added! I'll take a look at this as well and update this PR
Member
Do you have an estimate on when you might be able to check? I was planning on releasing in a few hours.
Member Author
I've fixed inspect.type_info. asdict did work as expected already.
Member Author
@ofek seems like that test you added uncovered another case that was still buggy. I've pushed an additional fix for that.
I've got the feeling though that there might still have some cases left elsewhere in the library where StructMeta isn't handled as expected ๐
Member
I pushed some code changes and a doc update. What we want to express in the type system currently is not possible, example discussion in python/typing#1489.
ofek approved these changes Nov 23, 2025
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for taking the initiative here!