aiojobs
aiojobs copied to clipboard
TypeError: timeout() got an unexpected keyword argument 'timeout'
aiojobs==0.3.0 async-timeout==4.0.0
Traceback (most recent call last):
File "/home/user/.pyenv/versions/project/lib/python3.9/site-packages/aiojobs/_job.py", line 58, in wait
return await asyncio.shield(self._do_wait(timeout),
File "/home/user/.pyenv/versions/project/lib/python3.9/site-packages/aiojobs/_job.py", line 47, in _do_wait
with async_timeout.timeout(timeout=timeout, loop=self._loop):
TypeError: timeout() got an unexpected keyword argument 'timeout'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/lang/projects/slot.py", line 254, in _calc_tk_inner
res = await job.wait(timeout=tk.timeout)
File "/home/user/.pyenv/versions/project/lib/python3.9/site-packages/aiojobs/_job.py", line 64, in wait
await self._close(scheduler.close_timeout)
File "/home/user/.pyenv/versions/project/lib/python3.9/site-packages/aiojobs/_job.py", line 87, in _close
with async_timeout.timeout(timeout=timeout,
TypeError: timeout() got an unexpected keyword argument 'timeout'
Thanks for the report.
Fix should be with async_timeout.timeout(timeout=timeout, loop=self._loop):
-> async with async_timeout.timeout(timeout):
Would you prepare a pull request?