Andrew Svetlov <andrew.svet...@gmail.com> added the comment: 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. ---------- nosy: +asvetlov _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32104> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com