File test_asyncio.ensure_future_fix.patch of Package saltbundlepy-tornado
diff -urN a/tornado/test/asyncio_test.py b/tornado/test/asyncio_test.py
--- a/tornado/test/asyncio_test.py 2018-01-05 06:07:44.000000000 +0300
+++ b/tornado/test/asyncio_test.py 2022-02-03 15:01:36.703142562 +0300
@@ -43,12 +43,7 @@
# Test that we can yield an asyncio future from a tornado coroutine.
# Without 'yield from', we must wrap coroutines in ensure_future,
# which was introduced during Python 3.4, deprecating the prior "async".
- if hasattr(asyncio, 'ensure_future'):
- ensure_future = asyncio.ensure_future
- else:
- ensure_future = asyncio.async
-
- x = yield ensure_future(
+ x = yield asyncio.ensure_future(
asyncio.get_event_loop().run_in_executor(None, lambda: 42))
self.assertEqual(x, 42)