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

feat: add support for typing.Required, NotRequired #125

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

claui
Copy link
Contributor

@claui claui commented Aug 18, 2024

Previously, annotating a TypedDict field with one of the Required and NotRequired wrappers introduced in Python 3.11, dataclass-wizard would raise the following error:

TypeError: issubclass() arg 1 must be a class

This pull request fixes that error by adding support for Required and NotRequired.

See also issue #121, part of which is addressed by this PR.

Previously, annotating a `TypedDict` field with one of the `Required`
and `NotRequired` wrappers introduced in Python 3.11, dataclass-wizard
would raise the following error:

> TypeError: issubclass() arg 1 must be a class

Fix that error by adding support for `Required` and `NotRequired`.

Partially addresses issue rnag#121. [1]

[1]: rnag#121
@claui
Copy link
Contributor Author

claui commented Aug 30, 2024

@rnag What can I do to help get this merged?

@rnag
Copy link
Owner

rnag commented Nov 4, 2024

Fixes #121 and #122

@rnag
Copy link
Owner

rnag commented Nov 4, 2024

@claui I'm afraid the fault lies with my general laziness and inattention to my projects 😅

Sorry for that. Just been busy with life. This looks good to merge for me, so I'll go ahead with it. Thanks again 🙏 for the huge help with TypedDict and addressing the issues that were raised (noted above).

@rnag rnag merged commit fcd412d into rnag:main Nov 4, 2024
@rnag
Copy link
Owner

rnag commented Nov 4, 2024

Released in v0.24.0 🎉

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.

2 participants