Stop asyncio.async throwing a syntax error in 3.7.

Maintains support for < 3.4.4
This commit is contained in:
MysterialPy 2017-11-13 22:07:54 +10:00 committed by GitHub
parent 98c8928934
commit 096584733e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ import asyncio
try:
create_task = asyncio.ensure_future
except AttributeError:
create_task = asyncio.async
create_task = getattr(asyncio, 'async')
try:
_create_future = asyncio.AbstractEventLoop.create_future