Skip to content

Conversation

@AlexWaygood
Copy link
Member

As with #44, the tests here are basically copied from the cpython main branch. Unlike #44, however, the implementation needs to be a little bit different. On Python <= 3.10, typing.Generic raises a TypeError if Generic.__init_subclass__ is called from _TypedDictMeta.__new__, so I had to work around this.

Backport of python/cpython#27663, by Samodya Abey. Closes #7. Cc. @davidfstr.

@AlexWaygood AlexWaygood marked this pull request as ready for review May 27, 2022 14:45
@JelleZijlstra JelleZijlstra self-requested a review May 27, 2022 16:01
@JelleZijlstra JelleZijlstra merged commit 1baf0a5 into python:main May 27, 2022
@AlexWaygood AlexWaygood deleted the typeddict branch May 27, 2022 22:30
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.

Backport generic NamedTuple and TypedDict support

2 participants