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

Remove _typed_dict.py #2166

Open
EmreTech opened this issue Jul 10, 2023 · 0 comments
Open

Remove _typed_dict.py #2166

EmreTech opened this issue Jul 10, 2023 · 0 comments
Labels
feature request New feature request on hold

Comments

@EmreTech
Copy link
Contributor

Summary

Remove the _typed_dict module, which acts as a shortcut for importing TypedDict.

What is the feature request for?

The core library

The Problem

The _typed_dict module is redundant. Its whole deal is to try and import the right version of TypedDict because TypedDict in the stdlib of Python <3.11 does not have support for the Required and NotRequired modifiers.

However, typing_extensions can be used as a drop-in replacement for this compatibility module because typing_extensions already focuses on making newer typing features available for older versions of Python. Even if the Python version is new enough to have those typing features, the typing_extensions module exports the features from the original typing module, making it basically seamless.

The Ideal Solution

Replace any imports of the _typed_dict module with imports from typing_extensions. Additionally, ensure that the typing_extensions requirement is installed for all versions of Python.

The Current Solution

No response

Additional Context

No response

@EmreTech EmreTech added the feature request New feature request label Jul 10, 2023
@Dorukyum Dorukyum removed the on hold label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request on hold
Projects
None yet
Development

No branches or pull requests

3 participants