Skip to content

Commit 537a104

Browse files
authored
Move Protocol, runtime_checkable, Final, final, Literal, and TypedDict to typing (#649)
Fixes #648 This essentially just moves a bunch of code and tests from Python 2 version of `typing_extensions` to Python 2 version of `typing`. We don't need to copy the definitions in the former, and can just re-export them from `typing`, since there is not built-in `typing` module on Python 2, so that we can always assume the latest version of `typing` (we will just need to release them in right order, `typing` first, and then update dependency in `typing_extensions`). Notable changes apart from the code move: * Like on Python 3, keep `runtime` in `typing_extensions` as an alias for `runtime_checkable` for backwards compatibility (the former is not included in `__all__`) * Update `GenericMeta.__new__` and `GenericMeta.__getitem__` instead of almost identical overrides in `_ProtocolMeta`.
1 parent 20d1f1b commit 537a104

File tree

5 files changed

+1107
-1281
lines changed

5 files changed

+1107
-1281
lines changed

0 commit comments

Comments
 (0)