[Python-checkins] [3.11] Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (GH-106136) (#106180)
hugovk
webhook-mailer at python.org
Wed Jun 28 01:38:29 EDT 2023
https://github.com/python/cpython/commit/2cce465416ebd0773654357bb68ea834655a72bf
commit: 2cce465416ebd0773654357bb68ea834655a72bf
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: hugovk <hugovk at users.noreply.github.com>
date: 2023-06-27T23:38:26-06:00
summary:
[3.11] Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (GH-106136) (#106180)
Co-authored-by: lightdrk <108566237+lightdrk at users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk at users.noreply.github.com>
files:
M Doc/library/asyncio-task.rst
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 550a84ebae39..ad5466b12b65 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -601,16 +601,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:
More information about the Python-checkins
mailing list