Skip to content

asyncio.wait_for() docs still say a coroutine is wrapped in a Task #155894

Closed

Description

@deadlovelll

Documentation

Since 3.12 asyncio.wait_for() no longer wraps a coroutine in a Task for positive timeouts, but the docs still say it does

Where the docs are misleading:

Doc/library/asyncio-task.rst:846 — "If fut is a coroutine it is automatically scheduled as a Task."
Lib/asyncio/tasks.py:443 — "Coroutine will be wrapped in Task."

:846-855 also refer to "the task" that does not exist, and there is no versionchanged:: 3.12.

Linked PRs

Activity

  1. kumaraditya303 commented on Aug 17, 2026

    @kumaraditya303
    Contributor

    I don't think it is useful to document if a task gets created or not here, maybe just remove that line altogether?

  2. deadlovelll commented on Aug 17, 2026

    @deadlovelll
    ContributorAuthor

    I don't think it is useful to document if a task gets created or not here, maybe just remove that line altogether?

    I proceeded on the assumption that a previously documented implementation detail should stay documented. In any case, I agree. I just pushed the changes

  3. added 2 commits that reference this issue on Aug 18, 2026
  4. moved this from Todo to Done in asyncioon Aug 18, 2026
  5. added 2 commits that reference this issue on Aug 19, 2026
  6. moved this from Done to In Progress in asyncioon Aug 21, 2026
  7. moved this from In Progress to Done in asyncioon Aug 21, 2026
  8. added a commit that references this issue on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions