commit | f9b83a235d28bf83f484520eb499e596e73fe45a | [log] [tgz] |
---|---|---|
author | Alex Waygood <Alex.Waygood@Gmail.com> | Wed Jun 14 13:36:16 2023 +0100 |
committer | GitHub <noreply@github.com> | Wed Jun 14 05:36:16 2023 -0700 |
tree | acc3f335e6d4cfe4768ad3e0ffa62bb0afc18b80 | |
parent | 890a03eaa1ffcdf6c094b991e404badb9caf35bc [diff] |
Allow typing_extensions.Protocol and typing.Protocol to mix (#237) Fixes #236 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
The typing_extensions
module serves two related purposes:
typing.TypeGuard
is new in Python 3.10, but typing_extensions
allows users on previous Python versions to use it too.typing
module.typing_extensions
uses Semantic Versioning. The major version will be incremented only for backwards-incompatible changes. Therefore, it's safe to depend on typing_extensions
like this: typing_extensions >=x.y, <(x+1)
, where x.y
is the first version that includes all features you need.
typing_extensions
supports Python versions 3.7 and higher.
See the documentation for a complete listing of module contents.
To run tests, navigate into the src/
directory and run test_typing_extensions.py
.