[issue42636] shielded task exception never retrieved when outer task cancelled

2020-12-15 Thread Martin Natano
Martin Natano added the comment: How would calling `outer.exception()` suppress the message? This happens when the outer task is cancelled while the inner task is still running. In that case the exception is never set on outer. -- ___ Python track

[issue42636] shielded task exception never retrieved when outer task cancelled

2020-12-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report. I didn't test but looks like `outer.exception()` call can suppress the message about not retrieved exception. -- ___ Python tracker

[issue42636] shielded task exception never retrieved when outer task cancelled

2020-12-14 Thread Martin Natano
Martin Natano added the comment: I'm not sure how to fix this, but here is a regression test for the issue. (failing on the current master branch) -- keywords: +patch Added file: https://bugs.python.org/file49680/regression-test.patch ___ Python tr

[issue42636] shielded task exception never retrieved when outer task cancelled

2020-12-14 Thread Martin Natano
New submission from Martin Natano : A task created with asyncio.shield() never retrieves the task exception, which results in a log message being generated. See the attached script for a minimal example. Output looks something like this: Task exception was never retrieved future: exception=