pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Remove _typed_dict.py

Open EmmmaTech opened this issue 2 years ago • 1 comments

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

EmmmaTech avatar Jul 10 '23 07:07 EmmmaTech

pls assign me

Paillat-dev avatar Oct 13 '24 16:10 Paillat-dev