FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` by kovan · Pull Request #144449 · python/cpython · GitHub

Repository navigation

gh-142044: Add note to prefer asyncio.timeout[_at] over asyncio.Timeout - #144449

Merged
picnixz merged 3 commits into
python:mainfrom
kovan:gh-142044-asyncio-timeout-docs
Feb 7, 2026
Merged

picnixz merged 3 commits into
python:mainfrom
kovan:gh-142044-asyncio-timeout-docs

Conversation

kovan commented Feb 3, 2026 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

Summary

  • Adds a note to the Timeout class documentation recommending that users prefer asyncio.timeout() or asyncio.timeout_at() rather than instantiating Timeout directly
  • This matches the guidance already present in the source code docstring at Lib/asyncio/timeouts.py:26-28

Test plan

  • make check passed in Doc/ directory
  • Documentation builds correctly

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://cpython-previews--144449.org.readthedocs.build/

Comment thread Doc/library/asyncio-task.rst Outdated
An :ref:`asynchronous context manager <async-context-managers>`
for cancelling overdue coroutines.

.. note::

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This note should be placed elsewhere. Either after the class definition or before introducing it.

bedevere-app Bot commented Feb 3, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

…imeout

Document that users should prefer using asyncio.timeout() or
asyncio.timeout_at() rather than directly instantiating the Timeout
class, matching the guidance already present in the source code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

kovan commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

bedevere-app Bot commented Feb 4, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@picnixz: please review the changes made to this pull request.

bedevere-app Bot requested a review from picnixz February 4, 2026 00:00
Comment thread Doc/library/asyncio-task.rst Outdated
Move the guidance about preferring asyncio.timeout()/timeout_at()
from a .. note:: block into the Timeout class description text,
per reviewer feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

kovan commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

bedevere-app Bot commented Feb 6, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@picnixz: please review the changes made to this pull request.

bedevere-app Bot requested a review from picnixz February 6, 2026 20:08
Comment thread Doc/library/asyncio-task.rst Outdated
picnixz changed the title gh-142044: Add note to prefer asyncio.timeout/timeout_at over Timeout gh-142044: Add note to prefer asyncio.timeout[_at] over asyncio.Timeout Feb 7, 2026
picnixz enabled auto-merge (squash) February 7, 2026 12:18
picnixz merged commit 0e7c06a into python:main Feb 7, 2026
29 checks passed
github-project-automation Bot moved this from Todo to Done in Docs PRs Feb 7, 2026

Copy link
Copy Markdown

Thanks @kovan for the PR, and @picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2026
…cio.Timeout` (pythonGH-144449)

(cherry picked from commit 0e7c06a)

Co-authored-by: kovan <xaum.io@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2026
…cio.Timeout` (pythonGH-144449)

(cherry picked from commit 0e7c06a)

Co-authored-by: kovan <xaum.io@gmail.com>

bedevere-app Bot commented Feb 7, 2026

Copy link
Copy Markdown

GH-144565 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Feb 7, 2026

bedevere-app Bot commented Feb 7, 2026

Copy link
Copy Markdown

GH-144566 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Feb 7, 2026
picnixz pushed a commit that referenced this pull request Feb 7, 2026
…ncio.Timeout` (GH-144449) (#144565)

gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449)
(cherry picked from commit 0e7c06a)

Co-authored-by: kovan <xaum.io@gmail.com>
picnixz pushed a commit that referenced this pull request Feb 7, 2026
…ncio.Timeout` (GH-144449) (#144566)

gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449)
(cherry picked from commit 0e7c06a)

Co-authored-by: kovan <xaum.io@gmail.com>
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news topic-asyncio

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL