You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "kafka-python/kafka/record/test.py", line 10, in <module>
loop.run_until_complete(test())
File "uvloop/loop.pyx", line 1203, in uvloop.loop.Loop.run_until_complete (uvloop/loop.c:25632)
File "uvloop/future.pyx", line 146, in uvloop.loop.BaseFuture.result (uvloop/loop.c:109361)
File "uvloop/future.pyx", line 101, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:108900)
File "uvloop/future.pyx", line 372, in uvloop.loop.BaseTask._fast_step (uvloop/loop.c:112669)
File "kafka-python/kafka/record/test.py", line 7, in test
await asyncio.wait_for(asyncio.sleep(10), timeout=float("inf"))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 362, in wait_for
timeout_handle = loop.call_later(timeout, _release_waiter, waiter)
File "uvloop/loop.pyx", line 1048, in uvloop.loop.Loop.call_later (uvloop/loop.c:23438)
OverflowError: cannot convert float infinity to integer
The problem comes from aio-libs/aiokafka#210, basically, I put in float('inf') for the timeout in wait(fs) call and it worked with vanilla asyncio, but crashed on uvloop. Docs for asyncio don't really specify that timeout needs to be in a specific range. Semantically specifying float('inf') should probably be the same as None (no timeout).
The reasoning for using float('inf') is simple, we can do computations with it and still get a proper float type.
What do you think?
The text was updated successfully, but these errors were encountered:
PYTHONASYNCIODEBUG
in env?: yesRather this is to confirm if this is actually a bug )
Code:
Error:
The problem comes from aio-libs/aiokafka#210, basically, I put in
float('inf')
for the timeout inwait(fs)
call and it worked with vanilla asyncio, but crashed on uvloop. Docs for asyncio don't really specify that timeout needs to be in a specific range. Semantically specifyingfloat('inf')
should probably be the same as None (no timeout).The reasoning for using
float('inf')
is simple, we can do computations with it and still get a proper float type.What do you think?
The text was updated successfully, but these errors were encountered: