diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-28 05:38:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 05:38:01 (GMT) |
commit | 56e39192c8e78ef498aa60a9fd5eb15b2c7338e1 (patch) | |
tree | b3a2f3829ac4d024bcf22a49d5a50708dc76688e /Doc/library | |
parent | 0373c2ccd5f60dd7b6435879e2f8c1b9ed879a3a (diff) | |
download | cpython-56e39192c8e78ef498aa60a9fd5eb15b2c7338e1.zip cpython-56e39192c8e78ef498aa60a9fd5eb15b2c7338e1.tar.gz cpython-56e39192c8e78ef498aa60a9fd5eb15b2c7338e1.tar.bz2 |
[3.12] Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (GH-106136) (#106179)
Co-authored-by: lightdrk <108566237+lightdrk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-task.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index fe8d028..d07fbae 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -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: |