This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients Oleg K2, asvetlov, yselivanov
Date 2017-12-13.19:15:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513192518.03.0.213398074469.issue32104@psf.upfronthosting.co.za>
In-reply-to
Content
I think the ship has sailed.
Now too many code is based on assumption that the only way to cancel a task from outer code is `task.cancel()`. Internally it is turned into 

try:
   await do_stuff()
except asyncio.CancelledError:
   do_task_cancellation() 

Raising *any* exception for cancellation breaks all existing code like this. Moreover figuring out if a task was cancelled from outside (by timeout for example) or exception was raised by inner code becomes impossible.

I suggest closing the issue with "wont fix" resolution.
History
Date User Action Args
2017-12-13 19:15:18asvetlovsetrecipients: + asvetlov, yselivanov, Oleg K2
2017-12-13 19:15:18asvetlovsetmessageid: <1513192518.03.0.213398074469.issue32104@psf.upfronthosting.co.za>
2017-12-13 19:15:18asvetlovlinkissue32104 messages
2017-12-13 19:15:17asvetlovcreate