From: Ben Darnell Date: Fri, 26 Jan 2018 23:03:58 +0000 (-0500) Subject: asyncio_test: Fix compatibility with Python 3.7 nightlies X-Git-Tag: v5.0.0~13^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49804d9d0d39919ea74498bc61559d49b67f8b0f;p=thirdparty%2Ftornado.git asyncio_test: Fix compatibility with Python 3.7 nightlies --- diff --git a/tornado/test/asyncio_test.py b/tornado/test/asyncio_test.py index b08f065f1..bbabb5212 100644 --- a/tornado/test/asyncio_test.py +++ b/tornado/test/asyncio_test.py @@ -47,7 +47,8 @@ class AsyncIOLoopTest(AsyncTestCase): if hasattr(asyncio, 'ensure_future'): ensure_future = asyncio.ensure_future else: - ensure_future = asyncio.async + # async is a reserved word in Python 3.7 + ensure_future = getattr(asyncio, 'async') x = yield ensure_future( asyncio.get_event_loop().run_in_executor(None, lambda: 42))