From 49804d9d0d39919ea74498bc61559d49b67f8b0f Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Fri, 26 Jan 2018 18:03:58 -0500 Subject: [PATCH] asyncio_test: Fix compatibility with Python 3.7 nightlies --- tornado/test/asyncio_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- 2.47.3