Skip to content

[mypyc] Support class-based TypedDict definitions #10226

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

Merged
merged 12 commits into from
Mar 27, 2021
Merged

[mypyc] Support class-based TypedDict definitions #10226

merged 12 commits into from
Mar 27, 2021

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Mar 20, 2021

These need to be compiled as non-extension classes.

Also mypy has a special internal representation for these which doesn't
correspond to what's there at runtime and requires some hacks.

Fixes mypyc/mypyc#803.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Mar 20, 2021

In 3.9 TypedDict is no longer a real type object. It's not obvious what's the best way to support it. This is quite tricky.

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.

Can compile TypedDict but throws TypeError at runtime
2 participants