www/py-aioh2: Fix build with Python 3.7+
This commit is contained in:
parent
ac13892e7e
commit
213add47de
3 changed files with 20 additions and 1 deletions
|
@ -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+
|
||||
|
|
8
www/py-aioh2/files/patch-aioh2-helper.py
Normal file
8
www/py-aioh2/files/patch-aioh2-helper.py
Normal file
|
@ -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")
|
11
www/py-aioh2/files/patch-aioh2-protocol.py
Normal file
11
www/py-aioh2/files/patch-aioh2-protocol.py
Normal file
|
@ -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()
|
Loading…
Reference in a new issue