You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`.
0 commit comments