trycast
trycast copied to clipboard
Drop support for mypy_extensions.TypedDict
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
mypy_extensions.TypedDict was deprecated in Aug 2023, according to https://github.com/python/mypy_extensions/issues/46