]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 28 Jun 2023 05:38:01 +0000 (22:38 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 05:38:01 +0000 (23:38 -0600)
Co-authored-by: lightdrk <108566237+lightdrk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Doc/library/asyncio-task.rst

index fe8d028150403d0dfee1782a3814667a8ac199f2..d07fbae287e535ad876378028e101c9ba8852278 100644 (file)
@@ -651,16 +651,16 @@ Timeouts
     If ``long_running_task`` takes more than 10 seconds to complete,
     the context manager will cancel the current task and handle
     the resulting :exc:`asyncio.CancelledError` internally, transforming it
-    into an :exc:`asyncio.TimeoutError` which can be caught and handled.
+    into a :exc:`TimeoutError` which can be caught and handled.
 
     .. note::
 
       The :func:`asyncio.timeout` context manager is what transforms
-      the :exc:`asyncio.CancelledError` into an :exc:`asyncio.TimeoutError`,
-      which means the :exc:`asyncio.TimeoutError` can only be caught
+      the :exc:`asyncio.CancelledError` into a :exc:`TimeoutError`,
+      which means the :exc:`TimeoutError` can only be caught
       *outside* of the context manager.
 
-    Example of catching :exc:`asyncio.TimeoutError`::
+    Example of catching :exc:`TimeoutError`::
 
         async def main():
             try: