Backported and experimental type hints for Python
Find a file
2025-12-02 08:44:30 +01:00
.github Update GitHub actions setup-uv and checkout (#703) 2025-12-02 08:44:30 +01:00
doc docs: enable nitpicky mode (#671) 2025-09-03 14:16:25 +02:00
scripts Add workflow for Trusted Publishing (#395) 2024-05-16 14:58:06 -04:00
src Remove no_type_check_decorator from __all__ for Python >= 3.15 (#699) 2025-11-18 19:45:35 +00:00
.editorconfig Add .gitignore, .editorconfig, CONTRIBUTING.md (#43) 2022-05-19 18:16:10 +02:00
.gitignore Add Coverage workflow (#623) 2025-08-22 15:21:48 +01:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#685) 2025-10-06 23:21:39 +01:00
.readthedocs.yaml Use pre-commit for linting (#607) 2025-07-07 13:02:06 +02:00
CHANGELOG.md Ensure isinstance is unaffected by sys.setprofile for Concatenate[] and Unpack[] aliases; run PyPy tests under coverage (#668) 2025-09-09 16:13:47 +01:00
CONTRIBUTING.md Add development versioning scheming (#601) 2025-07-22 10:56:27 +02:00
LICENSE Sync LICENSE with CPython (#205) 2023-05-27 08:12:31 +02:00
pyproject.toml Failing pre-commit: Remove *removed* ruff rule UP038 (#691) 2025-10-19 10:28:58 +01:00
README.md Update README.md: suggest use of ~= syntax in readme. (#635) 2025-08-09 18:41:38 -07:00
SECURITY.md Add security documentation (#403) 2024-05-16 16:33:34 -04:00
tox.ini Add 3.14 to project classifiers and tox.ini (#604) 2025-05-25 16:41:54 +02:00

Typing Extensions

Chat at https://gitter.im/python/typing

Documentation PyPI

Overview

The typing_extensions module serves two related purposes:

  • Enable use of new type system features on older Python versions. For example, typing.TypeGuard is new in Python 3.10, but typing_extensions allows users on previous Python versions to use it too.
  • Enable experimentation with new type system PEPs before they are accepted and added to the typing module.

typing_extensions is treated specially by static type checkers such as mypy and pyright. Objects defined in typing_extensions are treated the same way as equivalent forms in typing.

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, where x.y is the first version that includes all features you need. This is equivalent to typing_extensions >=x.y, <(x+1). Do not depend on ~= x.y.z unless you really know what you're doing; that defeats the purpose of semantic versioning.

Included items

See the documentation for a complete listing of module contents.

Contributing

See CONTRIBUTING.md for how to contribute to typing_extensions.