Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9edad3c7
Commit
9edad3c7
authored
Dec 11, 2017
by
Yury Selivanov
Committed by
GitHub
Dec 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32272: Remove asyncio.async() function. (#4784)
parent
1b74f9b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
30 deletions
+2
-30
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+0
-3
Doc/library/asyncio-task.rst
Doc/library/asyncio-task.rst
+0
-6
Lib/asyncio/tasks.py
Lib/asyncio/tasks.py
+1
-21
Misc/NEWS.d/next/Library/2017-12-10-18-59-13.bpo-32272.Mu84Am.rst
...S.d/next/Library/2017-12-10-18-59-13.bpo-32272.Mu84Am.rst
+1
-0
No files found.
Doc/library/asyncio-eventloop.rst
View file @
9edad3c7
...
...
@@ -235,9 +235,6 @@ Tasks
interoperability. In this case, the result type is a subclass of
:class:`Task`.
This method was added in Python 3.4.2. Use the :func:`async` function to
support also older Python versions.
.. versionadded:: 3.4.2
.. method:: AbstractEventLoop.set_task_factory(factory)
...
...
Doc/library/asyncio-task.rst
View file @
9edad3c7
...
...
@@ -538,12 +538,6 @@ Task functions
The :meth:`AbstractEventLoop.create_task` method.
.. function:: async(coro_or_future, \*, loop=None)
A deprecated alias to :func:`ensure_future`.
.. deprecated:: 3.4.4
.. function:: wrap_future(future, \*, loop=None)
Wrap a :class:`concurrent.futures.Future` object in a :class:`Future`
...
...
Lib/asyncio/tasks.py
View file @
9edad3c7
...
...
@@ -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.
...
...
Misc/NEWS.d/next/Library/2017-12-10-18-59-13.bpo-32272.Mu84Am.rst
0 → 100644
View file @
9edad3c7
Remove asyncio.async() function.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment