trycast icon indicating copy to clipboard operation
trycast copied to clipboard

Drop support for mypy_extensions.TypedDict

Open davidfstr opened this issue 2 years ago • 1 comments

Why:

  • This kind of TypedDict was introduced in the era of Python 3.7, which is no longer supported by trycast.
    • It is reasonable (in @davidfstr 's opinion) to encourage other users to migrate to a version of TypedDict from the standard library (Python 3.9+) or from typing_extensions (Python 3.8).
  • Extra code is required to support this very old kind of TypedDict.

Timing:

  • Suggest actually dropping mypy_extensions.TypedDict support at the same time as dropping support for Python 3.8, because then the trycast(strict=...) parameter (which involves both Python 3.8's TypedDict and mypy_extensions.TypedDict, and nothing else) can be ~~cleanly removed~~ simplified at the same time

davidfstr avatar Dec 23 '23 15:12 davidfstr

mypy_extensions.TypedDict was deprecated in Aug 2023, according to https://github.com/python/mypy_extensions/issues/46

davidfstr avatar Apr 03 '24 02:04 davidfstr