diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2019-09-12 12:40:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-12 12:40:40 (GMT) |
commit | a488879cbaf4b8b52699cadccf73bb4c271bcb29 (patch) | |
tree | de6a1f6a029e3572ea749e6fe81bc461bf0c1732 /Doc/library | |
parent | 3ab61473ba7f3dca32d779ec2766a4faa0657923 (diff) | |
download | cpython-a488879cbaf4b8b52699cadccf73bb4c271bcb29.zip cpython-a488879cbaf4b8b52699cadccf73bb4c271bcb29.tar.gz cpython-a488879cbaf4b8b52699cadccf73bb4c271bcb29.tar.bz2 |
bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-subprocess.rst | 8 | ||||
-rw-r--r-- | Doc/library/asyncio-task.rst | 33 |
2 files changed, 31 insertions, 10 deletions
diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst index 444fb63..bd92257 100644 --- a/Doc/library/asyncio-subprocess.rst +++ b/Doc/library/asyncio-subprocess.rst @@ -71,6 +71,10 @@ Creating Subprocesses See the documentation of :meth:`loop.subprocess_exec` for other parameters. + .. deprecated-removed:: 3.8 3.10 + + The *loop* parameter. + .. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \ stdout=None, stderr=None, loop=None, \ limit=None, \*\*kwds) @@ -95,6 +99,10 @@ Creating Subprocesses escape whitespace and special shell characters in strings that are going to be used to construct shell commands. + .. deprecated-removed:: 3.8 3.10 + + The *loop* parameter. + .. note:: The default asyncio event loop implementation on **Windows** does not diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 1fcdcb9..57e0e07 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -334,6 +334,9 @@ Running Tasks Concurrently cancellation of one submitted Task/Future to cause other Tasks/Futures to be cancelled. + .. deprecated-removed:: 3.8 3.10 + The *loop* parameter. + .. _asyncio_example_gather: Example:: @@ -411,6 +414,9 @@ Shielding From Cancellation except CancelledError: res = None + .. deprecated-removed:: 3.8 3.10 + The *loop* parameter. + Timeouts ======== @@ -478,22 +484,12 @@ Waiting Primitives set concurrently and block until the condition specified by *return_when*. - .. deprecated:: 3.8 - - If any awaitable in *aws* is a coroutine, it is automatically - scheduled as a Task. Passing coroutines objects to - ``wait()`` directly is deprecated as it leads to - :ref:`confusing behavior <asyncio_example_wait_coroutine>`. - Returns two sets of Tasks/Futures: ``(done, pending)``. Usage:: done, pending = await asyncio.wait(aws) - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - *timeout* (a float or int), if specified, can be used to control the maximum number of seconds to wait before returning. @@ -525,6 +521,17 @@ Waiting Primitives Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures when a timeout occurs. + .. deprecated:: 3.8 + + If any awaitable in *aws* is a coroutine, it is automatically + scheduled as a Task. Passing coroutines objects to + ``wait()`` directly is deprecated as it leads to + :ref:`confusing behavior <asyncio_example_wait_coroutine>`. + + .. deprecated-removed:: 3.8 3.10 + + The *loop* parameter. + .. _asyncio_example_wait_coroutine: .. note:: @@ -568,6 +575,9 @@ Waiting Primitives Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures are done. + .. deprecated-removed:: 3.8 3.10 + The *loop* parameter. + Example:: for f in as_completed(aws): @@ -694,6 +704,9 @@ Task Object .. versionchanged:: 3.8 Added the ``name`` parameter. + .. deprecated-removed:: 3.8 3.10 + The *loop* parameter. + .. method:: cancel() Request the Task to be cancelled. |