[issue42682] awaiting a wrapped asyncio.Task multiple times gives long, repeative tracebacks

2022-03-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Incorrect traceback when future's exception is raised multiple times ___ Python tracker

[issue42682] awaiting a wrapped asyncio.Task multiple times gives long, repeative tracebacks

2022-03-18 Thread Irit Katriel
Irit Katriel added the comment: >>> asyncio.run(main()) Traceback (most recent call last): File "", line 6, in main File "C:\Users\User\src\cpython\Lib\asyncio\tasks.py", line 597, in _wait_for_one return f.result() # May raise f.exception(). ^^ File "", line 2,

[issue42682] awaiting a wrapped asyncio.Task multiple times gives long, repeative tracebacks

2022-03-18 Thread Irit Katriel
Irit Katriel added the comment: I don't think the OP is complaining about the internal asyncio machinery frames, but rather about the repetition of the "return f.result() # May raise f.exception()." frame. I will paste the output of the script in the next comment. -- nosy:

[issue42682] awaiting a wrapped asyncio.Task multiple times gives long, repeative tracebacks

2020-12-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: The traceback contains frames from asyncio internal machinery, that's why the traceback is long. IFIAK Python standard library never filters such calls, asyncio is not an exception. On the other hand, well-known pytest library supports `__tracebackhide__ =

[issue42682] awaiting a wrapped asyncio.Task multiple times gives long, repeative tracebacks

2020-12-19 Thread lilydjwg
New submission from lilydjwg : import asyncio async def crash(key): raise Exception('crash!') async def wait(fu): await fu async def main(): crasher = asyncio.create_task(crash(())) fs = [wait(crasher) for _ in range(10)] for fu in asyncio.as_completed(fs): try: await fu