Skip to content

Support custom enum metaclasses - #824

Merged
jcrist merged 3 commits into
msgspec:mainfrom
UnknownPlatypus:support-enumtype-subclasse
Apr 8, 2026
Merged

jcrist merged 3 commits into
msgspec:mainfrom
UnknownPlatypus:support-enumtype-subclasse

Conversation

@UnknownPlatypus

@UnknownPlatypus UnknownPlatypus commented Mar 15, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #822 (cc @Jonxslays)

This will help Django projects greatly because they tend to use TextChoices / IntChoices when they need enumerations and this makes them work.

This was my last blocker to adopt msgspec officially at work!

@UnknownPlatypus
UnknownPlatypus force-pushed the support-enumtype-subclasse branch from b219399 to 1be9289 Compare November 8, 2025 12:13
@UnknownPlatypus
UnknownPlatypus force-pushed the support-enumtype-subclasse branch from 1be9289 to 95f1e00 Compare November 24, 2025 09:37
@TheRealSeber

Copy link
Copy Markdown

hey, @jcrist @ofek any updates on this?

@jcrist jcrist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jcrist
jcrist merged commit 30495ae into msgspec:main Apr 8, 2026
22 checks passed
@UnknownPlatypus
UnknownPlatypus deleted the support-enumtype-subclasse branch April 8, 2026 19:10
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.

Struct that contains an Enum property with a metaclass cant be decoded

3 participants