Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix deprecation message
  • Loading branch information
aeros committed Oct 29, 2019
commit 42caba2594593ca1f8e64f9e951a9291ed7fcd5b
7 changes: 4 additions & 3 deletions Lib/asyncio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,10 @@ async def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED):
DeprecationWarning, stacklevel=2)

if any(coroutines.iscoroutine(f) for f in set(fs)):
warnings.warn("Passing coroutines objects to asyncio.wait() is "
"deprecated since Python 3.8, and scheduled for removal "
"in Python 3.11", DeprecationWarning)
warnings.warn("The explicit passing of coroutine objects to "
"asyncio.wait() is deprecated since Python 3.8, and "
"scheduled for removal in Python 3.11.",
DeprecationWarning, stacklevel=2)

fs = {ensure_future(f, loop=loop) for f in set(fs)}

Expand Down