-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Hello,
While trying to use a library based on AnyIO inside a PySide6/QAsync based app.
I got this error:
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/wiredb/client.py", line 65, in __asynccontextmanager__
| yield self
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/wire_websocket/client_wire.py", line 40, in _connect_ws
| await sleep_forever()
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/anyio/_core/_eventloop.py", line 99, in sleep_forever
| await sleep(math.inf)
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/anyio/_core/_eventloop.py", line 87, in sleep
| return await get_async_backend().sleep(delay)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/anyio/_backends/_asyncio.py", line 2369, in sleep
| await sleep(delay)
| File "/usr/lib64/python3.13/asyncio/tasks.py", line 714, in sleep
| h = loop.call_later(delay,
| futures._set_result_unless_cancelled,
| future, result)
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/qasync/__init__.py", line 471, in call_later
| return self._add_callback(
| ~~~~~~~~~~~~~~~~~~^
| asyncio.Handle(callback, args, self, context=context), delay
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| )
| ^
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/qasync/__init__.py", line 477, in _add_callback
| return self._timer.add_callback(handle, delay)
| ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
| File "/home/jeandet/PySide6.9.0Venv3.13/lib64/python3.13/site-packages/qasync/__init__.py", line 255, in add_callback
| timerid = self.startTimer(int(max(0, delay) * 1000))
| ~~~^^^^^^^^^^^^^^^^^^^^^^
| OverflowError: cannot convert float infinity to integer
+------------------------------------
It seems that QAsync implementation doesn't support math.inf as delay, not sure if this is a known issue.
Metadata
Metadata
Assignees
Labels
No labels