when the coroutine completes.
The *loop* argument is deprecated and scheduled for removal
- in Python 4.0.
+ in Python 3.10.
.. _asyncio_example_sleep:
If the wait is cancelled, the future *aw* is also cancelled.
The *loop* argument is deprecated and scheduled for removal
- in Python 4.0.
+ in Python 3.10.
.. _asyncio_example_waitfor:
done, pending = await asyncio.wait(aws)
The *loop* argument is deprecated and scheduled for removal
- in Python 4.0.
+ in Python 3.10.
*timeout* (a float or int), if specified, can be used to control
the maximum number of seconds to wait before returning.
.. note::
Support for generator-based coroutines is **deprecated** and
- is scheduled for removal in Python 4.0.
+ is scheduled for removal in Python 3.10.
Generator-based coroutines predate async/await syntax. They are
Python generators that use ``yield from`` expressions to await
await old_style_coroutine()
This decorator is **deprecated** and is scheduled for removal in
- Python 4.0.
+ Python 3.10.
This decorator should not be used for :keyword:`async def`
coroutines.
if loop is None:
loop = events.get_running_loop()
else:
- warnings.warn("The loop argument is deprecated and scheduled for"
- "removal in Python 4.0.",
+ warnings.warn("The loop argument is deprecated and scheduled for "
+ "removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
fs = {ensure_future(f, loop=loop) for f in set(fs)}
if loop is None:
loop = events.get_running_loop()
else:
- warnings.warn("The loop argument is deprecated and scheduled for"
- "removal in Python 4.0.",
+ warnings.warn("The loop argument is deprecated and scheduled for "
+ "removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
if timeout is None:
if loop is None:
loop = events.get_running_loop()
else:
- warnings.warn("The loop argument is deprecated and scheduled for"
- "removal in Python 4.0.",
+ warnings.warn("The loop argument is deprecated and scheduled for "
+ "removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
future = loop.create_future()