Documentation
As pointed out in #123521, currently we have typing-related usage of PEP585 generics (Generator, Callable, Coroutine, etc.) explained on typing page. However, those aliases are deprecated, and there's no backlink from their collections.abc counterparts.
So, currently all users of the recommended modern option (collections.abc generics) have no documentation regarding their use in typing context at hand. Worse, classes there don't even have their generic arguments listed - only the name:
class collections.abc.Generator
This clearly should be fixed. At minimum the following needs to hold:
collections.abc aliases have their generic arguments listed in the docs
- All typing-related info from corresponding
typing docs entries should be reachable from collections.abc docs.
Upon some thinking I agree with @ZeroIntensity that moving all information to collections.abc and only retaining deprecation warning with a link in typing docs could be the most ergonomic option.
Linked PRs
Documentation
As pointed out in #123521, currently we have typing-related usage of PEP585 generics (
Generator,Callable,Coroutine, etc.) explained ontypingpage. However, those aliases are deprecated, and there's no backlink from theircollections.abccounterparts.So, currently all users of the recommended modern option (
collections.abcgenerics) have no documentation regarding their use in typing context at hand. Worse, classes there don't even have their generic arguments listed - only the name:This clearly should be fixed. At minimum the following needs to hold:
collections.abcaliases have their generic arguments listed in the docstypingdocs entries should be reachable fromcollections.abcdocs.Upon some thinking I agree with @ZeroIntensity that moving all information to
collections.abcand only retaining deprecation warning with a link intypingdocs could be the most ergonomic option.Linked PRs
collections.abcdocs #123544collections.abcdocs (GH-123544) #123790collections.abcdocs (#123544) #123792