Message403350
> But, once the asyncio.Task is cancelled, is impossible to retrieve that original asyncio.CancelledError(msg) exception with the message, because it seems that *a new* asyncio.CancelledError() [without the message] is raised when asyncio.Task.result() or asyncio.Task.exception() methods are called.
You say it's "impossible", but isn't the message accessible via the exception chain (and visible in the traceback)? One benefit of not duplicating the message on the internal call to cancel() is that it makes it easier to pinpoint which CancelledError object is associated with the user's call to cancel(), and which is associated with the call done by asyncio internals, which is a different cancellation. Another benefit is that it prevents info from being duplicated in the traceback. |
|
Date |
User |
Action |
Args |
2021-10-07 06:46:58 | chris.jerdonek | set | recipients:
+ chris.jerdonek, asvetlov, yselivanov, bjs, pagliaricci.m |
2021-10-07 06:46:58 | chris.jerdonek | set | messageid: <1633589218.35.0.288938903015.issue45390@roundup.psfhosted.org> |
2021-10-07 06:46:58 | chris.jerdonek | link | issue45390 messages |
2021-10-07 06:46:58 | chris.jerdonek | create | |
|