summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-11 15:03:48 (GMT)
committerGitHub <noreply@github.com>2017-12-11 15:03:48 (GMT)
commit9edad3c7011ccab0a66a065933abebf3288cf1a1 (patch)
tree23d6606e290e810ddf8b5c428873ea56a19e1578 /Lib/asyncio/tasks.py
parent1b74f9b77a6fa1d7828986cb79d5b10942ff9141 (diff)
downloadcpython-9edad3c7011ccab0a66a065933abebf3288cf1a1.zip
cpython-9edad3c7011ccab0a66a065933abebf3288cf1a1.tar.gz
cpython-9edad3c7011ccab0a66a065933abebf3288cf1a1.tar.bz2
bpo-32272: Remove asyncio.async() function. (#4784)
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index e0af5ab..c5122f7 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -3,7 +3,7 @@
__all__ = (
'Task',
'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED',
- 'wait', 'wait_for', 'as_completed', 'sleep', 'async',
+ 'wait', 'wait_for', 'as_completed', 'sleep',
'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe',
)
@@ -489,26 +489,6 @@ async def sleep(delay, result=None, *, loop=None):
h.cancel()
-def async_(coro_or_future, *, loop=None):
- """Wrap a coroutine in a future.
-
- If the argument is a Future, it is returned directly.
-
- This function is deprecated in 3.5. Use asyncio.ensure_future() instead.
- """
-
- warnings.warn("asyncio.async() function is deprecated, use ensure_future()",
- DeprecationWarning,
- stacklevel=2)
-
- return ensure_future(coro_or_future, loop=loop)
-
-# Silence DeprecationWarning:
-globals()['async'] = async_
-async_.__name__ = 'async'
-del async_
-
-
def ensure_future(coro_or_future, *, loop=None):
"""Wrap a coroutine or an awaitable in a future.