Date: Fri, 25 Mar 2022 13:45:43 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 213add47de1a - main - www/py-aioh2: Fix build with Python 3.7+ Message-ID: <202203251345.22PDjhSY022446@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=213add47de1a7e72d3f37dcadf68422fb34fbb73 commit 213add47de1a7e72d3f37dcadf68422fb34fbb73 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-03-25 13:04:49 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-03-25 13:37:17 +0000 www/py-aioh2: Fix build with Python 3.7+ --- www/py-aioh2/Makefile | 2 +- www/py-aioh2/files/patch-aioh2-helper.py | 8 ++++++++ www/py-aioh2/files/patch-aioh2-protocol.py | 11 +++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/www/py-aioh2/Makefile b/www/py-aioh2/Makefile index dcf1ce40304d..23c495a4da46 100644 --- a/www/py-aioh2/Makefile +++ b/www/py-aioh2/Makefile @@ -12,7 +12,7 @@ COMMENT= HTTP/2 implementation with hyper-h2 on Python 3 asyncio LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}h2>=3:www/py-h2@${PY_FLAVOR} \ +xRUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}h2>=3:www/py-h2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}priority>=1.3.0:www/py-priority@${PY_FLAVOR} USES= python:3.4+ diff --git a/www/py-aioh2/files/patch-aioh2-helper.py b/www/py-aioh2/files/patch-aioh2-helper.py new file mode 100644 index 000000000000..1df8af12a2a2 --- /dev/null +++ b/www/py-aioh2/files/patch-aioh2-helper.py @@ -0,0 +1,8 @@ +--- aioh2/helper.py.orig 2018-02-05 02:31:19 UTC ++++ aioh2/helper.py +@@ -86,4 +86,4 @@ if hasattr(socket, 'AF_UNIX'): + if hasattr(asyncio, 'ensure_future'): # Python >= 3.5 + async_task = asyncio.ensure_future + else: +- async_task = asyncio.async ++ async_task = getattr(asyncio, "async") diff --git a/www/py-aioh2/files/patch-aioh2-protocol.py b/www/py-aioh2/files/patch-aioh2-protocol.py new file mode 100644 index 000000000000..1bad65b74c6b --- /dev/null +++ b/www/py-aioh2/files/patch-aioh2-protocol.py @@ -0,0 +1,11 @@ +--- aioh2/protocol.py.orig 2017-12-03 09:08:55 UTC ++++ aioh2/protocol.py +@@ -380,7 +380,7 @@ class H2Protocol(asyncio.Protocol): + if self._handler: + raise Exception('Handler was already set') + if handler: +- self._handler = asyncio.async(handler, loop=self._loop) ++ self._handler = async_task(handler, loop=self._loop) + + def close_connection(self): + self._transport.close()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203251345.22PDjhSY022446>