https://github.com/python/cpython/commit/51ff5f376b6f806336029026618e6eaaee2a6d1b
commit: 51ff5f376b6f806336029026618e6eaaee2a6d1b
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: picnixz <[email protected]>
date: 2026-02-07T13:31:35+01:00
summary:

[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 <[email protected]>

files:
M Doc/library/asyncio-task.rst

diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 740f692d6a2a04..3465f0c09ae417 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -758,6 +758,9 @@ Timeouts
        An :ref:`asynchronous context manager <async-context-managers>`
        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:
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to