Skip to content

Commit

Permalink
utils: json rpc: fix incompatibility with Python<3.10
Browse files Browse the repository at this point in the history
All `asyncio.Queue` versions, prior to Python 3.10, require the `loop`
argument, if multiple loops are running in one system.

Signed-off-by: Florian Scherf <[email protected]>
  • Loading branch information
fscherf committed Feb 9, 2024
1 parent b7aab6a commit 29bea6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions milan/utils/json_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ def __init__(self, loop, url):
self._stopped = asyncio.Future(loop=self.loop)
self._websocket_open = asyncio.Future(loop=self.loop)
self._websocket = None
self._read_queue = asyncio.Queue()
self._write_queue = asyncio.Queue()
self._read_queue = asyncio.Queue(loop=self.loop)
self._write_queue = asyncio.Queue(loop=self.loop)

self.loop.create_task(coro=self._handle_read_queue())
self.loop.create_task(coro=self._handle_write_queue())
Expand Down

0 comments on commit 29bea6c

Please sign in to comment.