heralding
heralding copied to clipboard
Python 3.10: asyncio unexpected argument 'loop'
Upon using Heralding with Python 3.10, it fails with the following error:
2024-01-16 19:08:21,456 (heralding.honeypot) Could not start PostgreSQL server on port 5432. Error: BaseEventLoop.create_server() got an unexpected keyword argument 'loop'
2024-01-16 19:08:21,456 (root) BaseEventLoop.create_server() got an unexpected keyword argument 'loop'
Traceback (most recent call last):
File "/root/.local/lib/python3.10/site-packages/Heralding-1.0.7-py3.10.egg/EGG-INFO/scripts/heralding", line 163, in <module>
honeypot.start()
File "/root/.local/lib/python3.10/site-packages/Heralding-1.0.7-py3.10.egg/heralding/honeypot.py", line 196, in start
raise ex
File "/root/.local/lib/python3.10/site-packages/Heralding-1.0.7-py3.10.egg/heralding/honeypot.py", line 188, in start
server = self.loop.run_until_complete(server_coro)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/usr/local/lib/python3.10/asyncio/streams.py", line 85, in start_server
return await loop.create_server(factory, host, port, **kwds)
TypeError: BaseEventLoop.create_server() got an unexpected keyword argument 'loop'
2024-01-16 19:08:21,456 (heralding.honeypot) All tasks were stopped.
BaseEventLoop.create_server() got an unexpected keyword argument 'loop'
This should be somewhat easily addressable by removing the loop
arguments when invoking asyncio
-- since that was removed in Python 3.10.