From: naglis Date: Wed, 19 May 2021 20:36:05 +0000 (+0000) Subject: bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine... X-Git-Tag: v3.11.0a1~1077 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c054e8f78f53035e06d6dc58c423d76c8a5fa39a;p=thirdparty%2FPython%2Fcpython.git bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) --- diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index b92f703509fc..dd903ce8ee91 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -578,7 +578,7 @@ Functions and classes provided: The :meth:`close` method is not implemented, :meth:`aclose` must be used instead. - .. method:: enter_async_context(cm) + .. coroutinemethod:: enter_async_context(cm) Similar to :meth:`enter_context` but expects an asynchronous context manager. @@ -592,7 +592,7 @@ Functions and classes provided: Similar to :meth:`callback` but expects a coroutine function. - .. method:: aclose() + .. coroutinemethod:: aclose() Similar to :meth:`close` but properly handles awaitables.