Message413794
For future reference, with Andrew's change merged above, the traceback for the example snippet in my message above:
https://bugs.python.org/issue45390#msg403570
is now the following. Observe that (1) the call to sleep() continues to be present, but (2) without introducing two new intermediate CancelledErrors, which increase the verbosity of the traceback:
Traceback (most recent call last):
File "/home/andrew/projects/cpython/exc_traceback.py", line 14, in <module>
asyncio.run(main())
^^^^^^^^^^^^^^^^^^^
File "/home/andrew/projects/cpython/Lib/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/andrew/projects/cpython/Lib/asyncio/base_events.py", line 640, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/andrew/projects/cpython/exc_traceback.py", line 11, in main
await task
^^^^^^^^^^
File "/home/andrew/projects/cpython/exc_traceback.py", line 5, in job
await asyncio.sleep(5)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/andrew/projects/cpython/Lib/asyncio/tasks.py", line 619, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledError: cancel job
(This is copied from Andrew's comment in the PR here:
https://github.com/python/cpython/pull/31383#issuecomment-1046822899 )
Serhiy, can you provide a sample snippet for your case with output, like I did in my message linked above? |
|
Date |
User |
Action |
Args |
2022-02-23 14:56:27 | chris.jerdonek | set | recipients:
+ chris.jerdonek, gvanrossum, asvetlov, serhiy.storchaka, yselivanov, graingert, bjs, pagliaricci.m |
2022-02-23 14:56:27 | chris.jerdonek | set | messageid: <1645628187.76.0.255518188516.issue45390@roundup.psfhosted.org> |
2022-02-23 14:56:27 | chris.jerdonek | link | issue45390 messages |
2022-02-23 14:56:27 | chris.jerdonek | create | |
|