From 4074c1c00a24c612e7625b68c9a08e5cd049d533 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 11 Mar 2017 03:35:43 +0800 Subject: [PATCH 1/2] bpo-24755: Document asyncio.wrap_future --- Doc/library/asyncio-task.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 558d17c0969793..ca9b94cc4cce30 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -540,6 +540,14 @@ Task functions .. deprecated:: 3.4.4 +.. function:: wrap_future(future, \*, loop=None) + + Wrap a :class:`concurrent.futures.Future` object in a + :class:`Future` object. + + When the original :class:`concurrent.futures.Future` is completed + so is the wrapping :class:`Future`. + .. function:: gather(\*coros_or_futures, loop=None, return_exceptions=False) Return a future aggregating results from the given coroutine objects or From 1554e17a9308988f034b90386252c97c0f1101c4 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 8 Jun 2017 23:16:45 -0700 Subject: [PATCH 2/2] Remove unneeded sentence, reflow. --- Doc/library/asyncio-task.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index ca9b94cc4cce30..804f1925b40929 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -542,11 +542,8 @@ Task functions .. function:: wrap_future(future, \*, loop=None) - Wrap a :class:`concurrent.futures.Future` object in a - :class:`Future` object. - - When the original :class:`concurrent.futures.Future` is completed - so is the wrapping :class:`Future`. + Wrap a :class:`concurrent.futures.Future` object in a :class:`Future` + object. .. function:: gather(\*coros_or_futures, loop=None, return_exceptions=False)