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
>>> asyncio.ensure_future(slow_operation(future))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/proj/python/cpython/Lib/asyncio/futures.py", line 196, in __repr__
info = self._repr_info()
File "/home/proj/python/cpython/Lib/asyncio/tasks.py", line 105, in _repr_info
coro = coroutines._format_coroutine(self._coro)
File "/home/proj/python/cpython/Lib/asyncio/coroutines.py", line 242, in _format_coroutine
filename = coro.gi_code.co_filename
AttributeError: 'coroutine' object has no attribute 'gi_code'
I understand the gi_ names all changed to cr_, so I guess this code has to adjust as well.
Should be fixed now. Thanks for discovering this, Martin!
Victor, I'll make a PR on github/asyncio with some refactoring or CoroWrapper etc. The code became too cumbersome, and has to be properly refactored. At least we should have one wrapper class for generator based coroutines, and another one for 'async def' ones.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: