Skip to content

Remove _typed_dict.py #2166

@EmmmaTech

Description

@EmmmaTech

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions