mirror of https://github.com/python/cpython
asyncio/docs: Replace Python 4.0 -> 3.10 (GH-9579)
This commit is contained in:
parent
5a5ce064b3
commit
fad6af2744
|
@ -277,7 +277,7 @@ Sleeping
|
||||||
when the coroutine completes.
|
when the coroutine completes.
|
||||||
|
|
||||||
The *loop* argument is deprecated and scheduled for removal
|
The *loop* argument is deprecated and scheduled for removal
|
||||||
in Python 4.0.
|
in Python 3.10.
|
||||||
|
|
||||||
.. _asyncio_example_sleep:
|
.. _asyncio_example_sleep:
|
||||||
|
|
||||||
|
@ -435,7 +435,7 @@ Timeouts
|
||||||
If the wait is cancelled, the future *aw* is also cancelled.
|
If the wait is cancelled, the future *aw* is also cancelled.
|
||||||
|
|
||||||
The *loop* argument is deprecated and scheduled for removal
|
The *loop* argument is deprecated and scheduled for removal
|
||||||
in Python 4.0.
|
in Python 3.10.
|
||||||
|
|
||||||
.. _asyncio_example_waitfor:
|
.. _asyncio_example_waitfor:
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ Waiting Primitives
|
||||||
done, pending = await asyncio.wait(aws)
|
done, pending = await asyncio.wait(aws)
|
||||||
|
|
||||||
The *loop* argument is deprecated and scheduled for removal
|
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
|
*timeout* (a float or int), if specified, can be used to control
|
||||||
the maximum number of seconds to wait before returning.
|
the maximum number of seconds to wait before returning.
|
||||||
|
@ -888,7 +888,7 @@ Generator-based Coroutines
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Support for generator-based coroutines is **deprecated** and
|
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
|
Generator-based coroutines predate async/await syntax. They are
|
||||||
Python generators that use ``yield from`` expressions to await
|
Python generators that use ``yield from`` expressions to await
|
||||||
|
@ -914,7 +914,7 @@ enforced.
|
||||||
await old_style_coroutine()
|
await old_style_coroutine()
|
||||||
|
|
||||||
This decorator is **deprecated** and is scheduled for removal in
|
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`
|
This decorator should not be used for :keyword:`async def`
|
||||||
coroutines.
|
coroutines.
|
||||||
|
|
|
@ -384,8 +384,8 @@ async def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED):
|
||||||
if loop is None:
|
if loop is None:
|
||||||
loop = events.get_running_loop()
|
loop = events.get_running_loop()
|
||||||
else:
|
else:
|
||||||
warnings.warn("The loop argument is deprecated and scheduled for"
|
warnings.warn("The loop argument is deprecated and scheduled for "
|
||||||
"removal in Python 4.0.",
|
"removal in Python 3.10.",
|
||||||
DeprecationWarning, stacklevel=2)
|
DeprecationWarning, stacklevel=2)
|
||||||
|
|
||||||
fs = {ensure_future(f, loop=loop) for f in set(fs)}
|
fs = {ensure_future(f, loop=loop) for f in set(fs)}
|
||||||
|
@ -414,8 +414,8 @@ async def wait_for(fut, timeout, *, loop=None):
|
||||||
if loop is None:
|
if loop is None:
|
||||||
loop = events.get_running_loop()
|
loop = events.get_running_loop()
|
||||||
else:
|
else:
|
||||||
warnings.warn("The loop argument is deprecated and scheduled for"
|
warnings.warn("The loop argument is deprecated and scheduled for "
|
||||||
"removal in Python 4.0.",
|
"removal in Python 3.10.",
|
||||||
DeprecationWarning, stacklevel=2)
|
DeprecationWarning, stacklevel=2)
|
||||||
|
|
||||||
if timeout is None:
|
if timeout is None:
|
||||||
|
@ -595,8 +595,8 @@ async def sleep(delay, result=None, *, loop=None):
|
||||||
if loop is None:
|
if loop is None:
|
||||||
loop = events.get_running_loop()
|
loop = events.get_running_loop()
|
||||||
else:
|
else:
|
||||||
warnings.warn("The loop argument is deprecated and scheduled for"
|
warnings.warn("The loop argument is deprecated and scheduled for "
|
||||||
"removal in Python 4.0.",
|
"removal in Python 3.10.",
|
||||||
DeprecationWarning, stacklevel=2)
|
DeprecationWarning, stacklevel=2)
|
||||||
|
|
||||||
future = loop.create_future()
|
future = loop.create_future()
|
||||||
|
|
Loading…
Reference in New Issue