Hello everyone,
I ran into a problem using the artiq_influxdb bridge. I use the latest beta version (40cea30) with nix and Debian (with WSL for testing, but this also happens on real Linux). When I execute artiq_influxdb
I receive this error:
Traceback (most recent call last):
File "/nix/store/0jx32q89bsv8knip2shd4kksbc64c7v7-python3.11-artiq-comtools-1.2/bin/.artiq_influxdb-wrapped", line 9, in <module>
sys.exit(main())
^^^^^^
File "/nix/store/m0xx9xcbab5pnqgqhaa9h34z849gqwhs-python3-3.11.6-env/lib/python3.11/site-packages/artiq_comtools/artiq_influxdb.py", line 249, in main
_, pending = loop.run_until_complete(asyncio.wait(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/p1zbyfrpj3hq50mxh5hmxl3kqpa2b1am-python3-3.11.6/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/nix/store/p1zbyfrpj3hq50mxh5hmxl3kqpa2b1am-python3-3.11.6/lib/python3.11/asyncio/tasks.py", line 425, in wait
raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
sys:1: RuntimeWarning: coroutine 'Server.wait_terminate' was never awaited
sys:1: RuntimeWarning: coroutine 'SignalHandler.wait_terminate' was never awaited
The same error occurs when I execute artiq_ctlmgr. I found an explanation to this error on stack overflow: stackoverflow: asyncio-wait-confusion-when-passed-a-coroutine
A compatibility issue with asyncio was already mentioned by jfniedermeyer .
I also noticed the code for sipyco was changed like the stack overflow solution suggests (Python 3.11 compatibility fix, f39f22b together with fix asyncio event loop management, 91a7906).
Based on this, I think the same changes should also be applied to artiq_comtools. In artiq_comtools coroutines are still passed directly to asyncio.wait() (artiq_comtools/artiq_influxdb.py#L250).
Is my assumption correct? Should I open an additional git issue for this problem or directly create a pull request? I have never contributed to a project before and would be very grateful for any advice.