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 @@ -1,23 +1,23 @@ # Created by: Po-Chuan Hsieh PORTNAME= aioh2 PORTVERSION= 0.2.2 CATEGORIES= www python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= sunpoet@FreeBSD.org 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+ USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes .include 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()