[Python-checkins] cpython (3.4): Issue #21376: document asyncio.TimeoutError

victor.stinner python-checkins at python.org
Thu May 29 00:05:25 CEST 2014


http://hg.python.org/cpython/rev/6d90e8df01f4
changeset:   90887:6d90e8df01f4
branch:      3.4
parent:      90885:95207bcd8298
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu May 29 00:04:57 2014 +0200
summary:
  Issue #21376: document asyncio.TimeoutError

files:
  Doc/library/asyncio-task.rst |  21 +++++++++++++++++----
  1 files changed, 17 insertions(+), 4 deletions(-)


diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -142,6 +142,18 @@
    The operation is not allowed in this state.
 
 
+TimeoutError
+------------
+
+.. exception:: TimeoutError
+
+   The operation exceeded the given deadline.
+
+.. note::
+
+   This exception is different from the builtin :exc:`TimeoutError` exception!
+
+
 Future
 ------
 
@@ -400,7 +412,8 @@
    Return an iterator whose values, when waited for, are :class:`Future`
    instances.
 
-   Raises :exc:`TimeoutError` if the timeout occurs before all Futures are done.
+   Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures
+   are done.
 
    Example::
 
@@ -521,8 +534,8 @@
 
    .. note::
 
-      This does not raise :exc:`TimeoutError`! Futures that aren't done when
-      the timeout occurs are returned in the second set.
+      This does not raise :exc:`asyncio.TimeoutError`! Futures that aren't done
+      when the timeout occurs are returned in the second set.
 
 
 .. function:: wait_for(fut, timeout, \*, loop=None)
@@ -534,7 +547,7 @@
    Coroutine will be wrapped in :class:`Task`.
 
    Returns result of the Future or coroutine.  When a timeout occurs, it
-   cancels the task and raises :exc:`TimeoutError`. To avoid the task
+   cancels the task and raises :exc:`asyncio.TimeoutError`. To avoid the task
    cancellation, wrap it in :func:`shield`.
 
    This function is a :ref:`coroutine <coroutine>`.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list