]> granicus.if.org Git - python/commitdiff
Issue #21376: document asyncio.TimeoutError
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 28 May 2014 22:04:57 +0000 (00:04 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 28 May 2014 22:04:57 +0000 (00:04 +0200)
Doc/library/asyncio-task.rst

index 4e5526e90ede6b5cba7926ca0b2b0d2509a5c979..67eaccd7bf6cfd2afc343b941c78989fb9d7fc50 100644 (file)
@@ -142,6 +142,18 @@ InvalidStateError
    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 @@ Task functions
    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 @@ Task functions
 
    .. 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 @@ Task functions
    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>`.