Examples shouldn't use typing_extensions
imports for stable typing
features
#1986
Labels
topic: documentation
Documentation-related issues and PRs
Description
There are a few code examples in the docs which import things from
typing_extensions
that are by now available in Python'styping
standard library module:List
typing/docs/guides/unreachable.rst
Line 57 in 3149e8c
typing/docs/reference/generics.rst
Line 655 in 3149e8c
... and 4 more occurrences in
reference/generics.rst
.typing/docs/reference/protocols.rst
Line 75 in 3149e8c
... and 4 more occurrences in
reference/protocols.rst
.typing/docs/reference/quality.rst
Line 43 in 3149e8c
It probably makes sense to use
typing
imports for all of these instead, possibly with thetyping_extensions
alternative mentioned.How to fix?
What is the policy for these? Should they just be replaced with bare
typing
imports or something more like?
I haven't seen the latter in any of the other imports, which just import from
typing
without comment (EDIT: at least not in the code itself, but usually it is mentioned as an alternative for older versions somewhere around the code), but who knows...The text was updated successfully, but these errors were encountered: