Yury Selivanov added the comment: > Will it cancel whole chain of depending futures in a RIGHT way ?
I was thinking about this: def Future.set_exception(exc): if isinstance(exc, asyncio.CancelledError): return self._cancel(exc) # here goes old code def Future.cancel(): return self._cancel(asyncio.CancelledError()) Although now, that I'm looking at it, I don't like this idea, because setting as exception is a different operation from cancelling a task/future, and we shouldn't mix them. It's OK to set a CancelledError without cancelling. Also this would be a backwards incompatible change. So back to square one -- we can consider passing extra args to .cancel() methods. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31033> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com