Add test to ensure certain names are not imported from typing_extensions (#6619)

This commit is contained in:
Alex Waygood
2021-12-17 22:50:25 +00:00
committed by GitHub
parent 0b75d71303
commit ae725c3f10
3 changed files with 56 additions and 4 deletions

View File

@@ -244,10 +244,13 @@ instead in typeshed stubs. This currently affects:
- `Literal` (new in Python 3.8)
- `SupportsIndex` (new in Python 3.8)
- `TypedDict` (new in Python 3.8)
- `Concatenate` (new in Python 3.10)
- `ParamSpec` (new in Python 3.10)
- `TypeGuard` (new in Python 3.10)
An exception is `Protocol`: although it was added in Python 3.8, it
can be used in stubs regardless of Python version.
Two exceptions are `Protocol` and `runtime_checkable`: although
these were added in Python 3.8, they can be used in stubs regardless
of Python version.
### What to include