From: Andrew Svetlov Date: Thu, 25 Nov 2021 17:20:17 +0000 (+0200) Subject: [3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) ... X-Git-Tag: v3.10.1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52d10f6485a168141e7a50d68f9a9566fdd8379d;p=thirdparty%2FPython%2Fcpython.git [3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779) Automerge-Triggered-By: GH:asvetlov (cherry picked from commit 4dd82194f4a0e48a94191655e571b3aad1c4a22a) Co-authored-by: Zbigniew Siciarz Co-authored-by: Zbigniew Siciarz --- diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 3dbf3a8f13da..b6ec6b8c876b 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -130,7 +130,9 @@ Functions and classes provided: either as decorators or with :keyword:`async with` statements:: import time + from contextlib import asynccontextmanager + @asynccontextmanager async def timeit(): now = time.monotonic() try: