[Python-checkins] [3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779)
asvetlov
webhook-mailer at python.org
Thu Nov 25 12:20:27 EST 2021
https://github.com/python/cpython/commit/52d10f6485a168141e7a50d68f9a9566fdd8379d
commit: 52d10f6485a168141e7a50d68f9a9566fdd8379d
branch: 3.10
author: Andrew Svetlov <andrew.svetlov at gmail.com>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2021-11-25T19:20:17+02:00
summary:
[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 <zbigniew at siciarz.net>
Co-authored-by: Zbigniew Siciarz <zbigniew at siciarz.net>
files:
M Doc/library/contextlib.rst
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 3dbf3a8f13da7..b6ec6b8c876be 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:
More information about the Python-checkins
mailing list