* Add deprecated-removed loop labels for all reelvant functions/classes in asyncio
Raises :exc:`ValueError` if called more times than there were
items placed in the queue.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
Priority Queue
==============
The *ssl_handshake_timeout* parameter.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
+
.. coroutinefunction:: start_server(client_connected_cb, host=None, \
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
The *ssl_handshake_timeout* and *start_serving* parameters.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. rubric:: Unix Sockets
The *path* parameter can now be a :term:`path-like object`
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
*, limit=None, sock=None, backlog=100, ssl=None, \
The *path* parameter can now be a :term:`path-like object`.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
StreamReader
============
See the documentation of :meth:`loop.subprocess_exec` for other
parameters.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \
stdout=None, stderr=None, limit=None, **kwds)
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. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. note::
Subprocesses are available for Windows if a :class:`ProactorEventLoop` is
finally:
lock.release()
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This class has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. coroutinemethod:: acquire()
Acquire the lock.
:meth:`clear` method. The :meth:`~Event.wait` method blocks until the
flag is set to *true*. The flag is set to *false* initially.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This class has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. _asyncio_example_sync_event:
Example::
``None``. In the latter case a new Lock object is created
automatically.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This class has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
The preferred way to use a Condition is an :keyword:`async with`
statement::
internal counter (``1`` by default). If the given value is
less than ``0`` a :exc:`ValueError` is raised.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This class has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
The preferred way to use a Semaphore is an :keyword:`async with`
statement::
a :exc:`ValueError` in :meth:`~Semaphore.release` if it
increases the internal counter above the initial *value*.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This class has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
---------
tasks to run. This can be used by long-running functions to avoid
blocking the event loop for the full duration of the function call.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. _asyncio_example_sleep:
Example of coroutine displaying the current date every second
asyncio.run(display_date())
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
+
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. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. _asyncio_example_gather:
Example::
If the *gather* itself is cancelled, the cancellation is
propagated regardless of *return_exceptions*.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. deprecated:: 3.10
Deprecation warning is emitted if no positional arguments are provided
or not all positional arguments are Future-like objects
except CancelledError:
res = None
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. deprecated:: 3.10
Deprecation warning is emitted if *aw* is not Future-like object
and there is no running event loop.
If the wait is cancelled, the future *aw* is also cancelled.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. _asyncio_example_waitfor:
Example::
for *aw* to be cancelled. Previously, it raised
:exc:`asyncio.TimeoutError` immediately.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
Waiting Primitives
==================
``wait()`` directly is deprecated as it leads to
:ref:`confusing behavior <asyncio_example_wait_coroutine>`.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. _asyncio_example_wait_coroutine:
.. note::
if task in done:
# Everything will work as expected now.
+ .. deprecated-removed:: 3.8 3.10
+
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. deprecated-removed:: 3.8 3.11
Passing coroutine objects to ``wait()`` directly is
Raises :exc:`asyncio.TimeoutError` if the timeout occurs before
all Futures are done.
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
Example::
for coro in as_completed(aws):
earliest_result = await coro
# ...
+ .. deprecated-removed:: 3.8 3.10
+ The ``loop`` parameter. This function has been implicitly getting the
+ current running loop since 3.7. See
+ :ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
+ for more information.
+
.. deprecated:: 3.10
Deprecation warning is emitted if not all awaitable objects in the *aws*
iterable are Future-like objects and there is no running event loop.
* ``cgi.log()`` is deprecated and slated for removal in Python 3.12.
(Contributed by Inada Naoki in :issue:`41139`.)
+.. _whatsnew310-removed:
Removed
=======
--- /dev/null
+Document the deprecation and removal of the ``loop`` parameter for many
+functions and classes in :mod:`asyncio`.