TypeError: shield() got an unexpected keyword argument 'loop'
Closed this issue · 4 comments
With Python 3.10, I'm getting
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-174' coro=<Pushl.send_webmention() done, defined at /home/tomi/.local/pipx/venvs/pushl/lib/python3.10/site-packages/pushl/__init__.py:180> exception=TypeError("shield() got an unexpected keyword argument 'loop'")>
Traceback (most recent call last):
File "/home/tomi/.local/pipx/venvs/pushl/lib/python3.10/site-packages/pushl/__init__.py", line 190, in send_webmention
target, code, cached = await webmentions.get_target(self, dest)
File "/home/tomi/.local/pipx/venvs/pushl/lib/python3.10/site-packages/async_lru.py", line 212, in wrapped
return (yield from asyncio.shield(fut, loop=_loop))
TypeError: shield() got an unexpected keyword argument 'loop'
Huh, interesting. I'll have to check my Pushl logs, since I've been running on 3.10 but haven't been paying attention to that.
It looks like the problem is in async-lru although there doesn't seem to be an open issue for it yet.
Oh, what version of async-lru is running in your environment? Is it possible that it needs to be updated? It looks like in the latest version there isn't a line 212.
I might need to just update Pushl's dependencies to pin a newer version.
Oh, indeed it looks like there isn't that line any more after reinstalling into a fresh venv. Should've taken a closer look at the trace. Sorry for the noise!
No problem! This got me to do an overdue version bump with new versions anyway.