git: ddbc3dc75057 - main - www/py-tornado4: Fix build with Python 3.7+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 25 Mar 2022 13:46:09 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ddbc3dc75057e35852d723edc19e8fbfd0c302cf

commit ddbc3dc75057e35852d723edc19e8fbfd0c302cf
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-25 13:06:05 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-25 13:37:22 +0000

    www/py-tornado4: Fix build with Python 3.7+
---
 www/py-tornado4/files/patch-tornado-test-asyncio_test.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/www/py-tornado4/files/patch-tornado-test-asyncio_test.py b/www/py-tornado4/files/patch-tornado-test-asyncio_test.py
new file mode 100644
index 000000000000..d59c0a88b756
--- /dev/null
+++ b/www/py-tornado4/files/patch-tornado-test-asyncio_test.py
@@ -0,0 +1,12 @@
+--- tornado/test/asyncio_test.py.orig	2018-01-05 03:07:44 UTC
++++ tornado/test/asyncio_test.py
+@@ -46,7 +46,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))