[Python-checkins] bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) (GH-26255)

iritkatriel webhook-mailer at python.org
Wed May 19 16:37:57 EDT 2021


https://github.com/python/cpython/commit/9a75cc604455962fd226b58ed033da92e68dd3c8
commit: 9a75cc604455962fd226b58ed033da92e68dd3c8
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: iritkatriel <iritkatriel at yahoo.com>
date: 2021-05-19T21:37:52+01:00
summary:

bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) (GH-26255)

(cherry picked from commit c054e8f78f53035e06d6dc58c423d76c8a5fa39a)

Co-authored-by: naglis <naglis at users.noreply.github.com>

files:
M Doc/library/contextlib.rst

diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 4c6c520713178c..aa848df8c42903 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -463,7 +463,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.
@@ -477,7 +477,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.
 



More information about the Python-checkins mailing list