From 51ff5f376b6f806336029026618e6eaaee2a6d1b Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sat, 7 Feb 2026 13:31:35 +0100 Subject: [PATCH] [3.13] gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449) (#144566) gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449) (cherry picked from commit 0e7c06a85880ba790fac4239b0ff1052399a36ae) Co-authored-by: kovan --- Doc/library/asyncio-task.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 740f692d6a2a..3465f0c09ae4 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -758,6 +758,9 @@ Timeouts An :ref:`asynchronous context manager ` for cancelling overdue coroutines. + Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at` + rather than instantiating :class:`!Timeout` directly. + ``when`` should be an absolute time at which the context should time out, as measured by the event loop's clock: -- 2.47.3