diff options
author | Yury Selivanov <yury@magic.io> | 2016-06-08 17:57:03 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-06-08 17:57:03 (GMT) |
commit | c1cf296de6d2dc18c6d692c9eb0e5c5c278fb938 (patch) | |
tree | cac03e422d754214f7324dd33274afe13c2a602a /Doc | |
parent | af74512e44e61920db36574087e75f1271787bf5 (diff) | |
download | cpython-c1cf296de6d2dc18c6d692c9eb0e5c5c278fb938.zip cpython-c1cf296de6d2dc18c6d692c9eb0e5c5c278fb938.tar.gz cpython-c1cf296de6d2dc18c6d692c9eb0e5c5c278fb938.tar.bz2 |
asyncio: Remove asyncio.timeout() context manager.
It will probably be added back in Python 3.6, once its compatibility
issues are resolved; see [1] for more details.
[1] https://mail.python.org/pipermail/async-sig/2016-June/000045.html
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/asyncio-task.rst | 16 | ||||
-rw-r--r-- | Doc/whatsnew/3.5.rst | 4 |
2 files changed, 0 insertions, 20 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index a1b69c8..de6ee58 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -662,22 +662,6 @@ Task functions except CancelledError: res = None -.. function:: timeout(timeout, \*, loop=None) - - Return a context manager that cancels a block on *timeout* expiring:: - - with timeout(1.5): - yield from inner() - - 1. If ``inner()`` is executed faster than in ``1.5`` seconds - nothing happens. - 2. Otherwise ``inner()`` is cancelled internally but - :exc:`asyncio.TimeoutError` is raised outside of - context manager scope. - - Passing ``None`` as *timeout* argument disables the manager logic. - - .. versionadded:: 3.5.2 .. coroutinefunction:: wait(futures, \*, loop=None, timeout=None,\ return_when=ALL_COMPLETED) diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index e3e73e4..83d5ce6 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -835,10 +835,6 @@ Updates in 3.5.2: method to get the current exception handler. (Contributed by Yury Selivanov.) -* New :func:`~asyncio.timeout` context manager to simplify timeouts - handling code. - (Contributed by Andrew Svetlov.) - * New :meth:`StreamReader.readuntil() <asyncio.StreamReader.readuntil>` method to read data from the stream until a separator bytes sequence appears. |