Move ContextManager
and AsyncContextManager
type hinting docs from typing
to contextlib
#123584
Labels
ContextManager
and AsyncContextManager
type hinting docs from typing
to contextlib
#123584
Documentation
PEP585 deprecated
typing.ContextManager
andtyping.AsyncContextManager
in favour of theircontextlib
counterparts. However,contextlib
documentation lacks any type hinting information and does not even list generic parameters.Several relevant changes were discussed along #123523.
Currently there's no backlink from
contextlib
totyping
docs, hence users don't have any trivial way to discover type parameters ofContextManager
(that's worse thancollections.abc.Generator
where such a link exists).Similarly to #123583, I propose to add a "Type hinting" section to both of them in
contextlib
documentation:The text was updated successfully, but these errors were encountered: