Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-142044: Add note to prefer asyncio.timeout/timeout_at over Timeout#144449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kovan wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromkovan:gh-142044-asyncio-timeout-docs

Conversation

@kovan
Copy link

@kovankovan commentedFeb 3, 2026
edited by github-actionsbot
Loading

Summary

  • Adds a note to theTimeout class documentation recommending that users preferasyncio.timeout() orasyncio.timeout_at() rather than instantiatingTimeout directly
  • This matches the guidance already present in the source code docstring atLib/asyncio/timeouts.py:26-28

Test plan

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

🤖 Generated withClaude Code


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

An:ref:`asynchronous context manager<async-context-managers>`
for cancelling overdue coroutines.

..note::
Copy link
Member

Choose a reason for hiding this comment

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

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

@bedevere-app
Copy link

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 phraseI 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.

…imeoutDocument that users should prefer using asyncio.timeout() orasyncio.timeout_at() rather than directly instantiating the Timeoutclass, matching the guidance already present in the source code.Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kovankovanforce-pushed thegh-142044-asyncio-timeout-docs branch from893bb26 to73df00fCompareFebruary 4, 2026 00:00
@kovan
Copy link
Author

I have made the requested changes; please review again

@bedevere-app
Copy link

Thanks for making the requested changes!

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

The context manager produced by:func:`asyncio.timeout` can be
rescheduled to a different deadline and inspected.

..note::
Copy link
Member

Choose a reason for hiding this comment

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

After looking at the generated doc, I think a note is a bit too loud. OTOH, I feel that havingTimeout inside the docs oftimeout is also wrong. My suggestion is to put it as a real documented class (outside the function description) and put that note there.

@kumaraditya303 How do you want the docs to be eventually rendered?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz requested changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303kumaraditya303 is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees

No one assigned

Labels

awaiting change reviewdocsDocumentation in the Doc dirskip news

Projects

Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kovan@picnixz

[8]ページ先頭

©2009-2026 Movatter.jp