christgau / wsdd

A Web Service Discovery host daemon.
MIT License
860 stars 101 forks source link

Pytnon 3.10: error open unix socket #162

Closed Izorkin closed 1 year ago

Izorkin commented 1 year ago

Not opening a unix socket with using python version 3.10: Debug log:

wsdd[6120]: 2022-12-15 18:26:36,096:wsdd INFO(pid 6120): received termination/interrupt signal, tearing down
wsdd[6120]: 2022-12-15 18:26:36,096:wsdd INFO(pid 6120): shutting down gracefully...
wsdd[6120]: Traceback (most recent call last):
wsdd[6120]:   File "/nix/store/5ns8lhc40dkl0vmga0dlbw42zanrli1k-wsdd-0.7.0/bin/.wsdd-wrapped", line 1783, in main
wsdd[6120]:     aio_loop.run_forever()
wsdd[6120]:   File "/nix/store/qc8rlhdcdxaf6dwbvv0v4k50w937fyzj-python3-3.10.8/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
wsdd[6120]:     self._run_once()
wsdd[6120]:   File "/nix/store/qc8rlhdcdxaf6dwbvv0v4k50w937fyzj-python3-3.10.8/lib/python3.10/asyncio/base_events.py", line 1899, in _run_once
wsdd[6120]:     handle._run()
wsdd[6120]:   File "/nix/store/qc8rlhdcdxaf6dwbvv0v4k50w937fyzj-python3-3.10.8/lib/python3.10/asyncio/events.py", line 80, in _run
wsdd[6120]:     self._context.run(self._callback, *self._args)
wsdd[6120]:   File "/nix/store/5ns8lhc40dkl0vmga0dlbw42zanrli1k-wsdd-0.7.0/bin/.wsdd-wrapped", line 1564, in sigterm_handler
wsdd[6120]:     sys.exit(0)
wsdd[6120]: SystemExit: 0
wsdd[6120]: During handling of the above exception, another exception occurred:
wsdd[6120]: Traceback (most recent call last):
wsdd[6120]:   File "/nix/store/5ns8lhc40dkl0vmga0dlbw42zanrli1k-wsdd-0.7.0/bin/.wsdd-wrapped", line 1799, in <module>
wsdd[6120]:     sys.exit(main())
wsdd[6120]:   File "/nix/store/5ns8lhc40dkl0vmga0dlbw42zanrli1k-wsdd-0.7.0/bin/.wsdd-wrapped", line 1787, in main
wsdd[6120]:     aio_loop.run_until_complete(api_server.cleanup())
wsdd[6120]:   File "/nix/store/qc8rlhdcdxaf6dwbvv0v4k50w937fyzj-python3-3.10.8/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
wsdd[6120]:     return future.result()
wsdd[6120]:   File "/nix/store/5ns8lhc40dkl0vmga0dlbw42zanrli1k-wsdd-0.7.0/bin/.wsdd-wrapped", line 1040, in cleanup
wsdd[6120]:     await self.create_task
wsdd[6120]:   File "/nix/store/5ns8lhc40dkl0vmga0dlbw42zanrli1k-wsdd-0.7.0/bin/.wsdd-wrapped", line 970, in create_server
wsdd[6120]:     self.server = await aio_loop.create_task(asyncio.start_unix_server(self.on_connect, path=listen_address,
wsdd[6120]:   File "/nix/store/qc8rlhdcdxaf6dwbvv0v4k50w937fyzj-python3-3.10.8/lib/python3.10/asyncio/streams.py", line 114, in start_unix_server
wsdd[6120]:     return await loop.create_unix_server(factory, path, **kwds)
wsdd[6120]: TypeError: _UnixSelectorEventLoop.create_unix_server() got an unexpected keyword argument 'loop'
christgau commented 1 year ago

Confirmed. https://docs.python.org/3/library/asyncio-stream.html#asyncio.start_unix_server states:

Changed in version 3.10: Removed the loop parameter.

I'll look into this, possibly within the next days