Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,11 @@ Timeouts
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 having Timeout inside the docs of timeout 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?

Copy link
Contributor

Choose a reason for hiding this comment

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

How do you want the docs to be eventually rendered?

I don't want to highlight timeout class much more than what it is already so let's keep it inside. I agree that note is bit louder so maybe we can just add it in the description.


Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at`
rather than instantiating :class:`Timeout` directly.

.. class:: Timeout(when)

An :ref:`asynchronous context manager <async-context-managers>`
Expand Down
Loading