git: 291e8f2aec54 - main - www/py-ws4py: Fix build with setuptools 58.0.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 16 Apr 2022 04:25:32 UTC
The branch main has been updated by sunpoet:

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

commit 291e8f2aec54f7d824438400e9eec3d0078ca1a3
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-04-16 04:15:45 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-04-16 04:19:54 +0000

    www/py-ws4py: Fix build with setuptools 58.0.0+
    
    With hat:       python
---
 www/py-ws4py/files/patch-async | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/www/py-ws4py/files/patch-async b/www/py-ws4py/files/patch-async
new file mode 100644
index 000000000000..1ff9bea881b2
--- /dev/null
+++ b/www/py-ws4py/files/patch-async
@@ -0,0 +1,31 @@
+--- ws4py/async_websocket.py.orig	2014-01-25 21:30:21 UTC
++++ ws4py/async_websocket.py
+@@ -84,7 +84,7 @@ class WebSocket(_WebSocket):
+         def closeit():
+             yield from self.proto.writer.drain()
+             self.proto.writer.close()
+-        asyncio.async(closeit())
++        asyncio.ensure_future(closeit())
+ 
+     def _write(self, data):
+         """
+@@ -94,7 +94,7 @@ class WebSocket(_WebSocket):
+         def sendit(data):
+             self.proto.writer.write(data)
+             yield from self.proto.writer.drain()
+-        asyncio.async(sendit(data))
++        asyncio.ensure_future(sendit(data))
+ 
+     @asyncio.coroutine
+     def run(self):
+--- ws4py/server/tulipserver.py.orig	2014-01-25 21:30:21 UTC
++++ ws4py/server/tulipserver.py
+@@ -40,7 +40,7 @@ class WebSocketProtocol(asyncio.StreamReaderProtocol):
+         #self.stream.set_transport(transport)
+         asyncio.StreamReaderProtocol.connection_made(self, transport)
+         # Let make it concurrent for others to tag along
+-        f = asyncio.async(self.handle_initial_handshake())
++        f = asyncio.ensure_future(self.handle_initial_handshake())
+         f.add_done_callback(self.terminated)
+ 
+     @property