[issue32528] Change base class for futures.CancelledError

Joongi Kim report at bugs.python.org
Sat Jan 13 13:03:34 EST 2018


Joongi Kim <me at daybreaker.info> added the comment:

I strongly agree to have discretion of CancelledError and other general exceptions, though I don't have concrete ideas on good unobtrusive ways to achieve this.

If I write my codes carefully I could control most of cancellation explicitly, but it is still hard to control it in 3rd-party libraries that I depend on. Often they just raise random errors, or CancelledError is swallowed.

Also it would be nice to have some documentation and examples on how to write "cancellation-friendly" coroutine codes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32528>
_______________________________________


More information about the Python-bugs-list mailing list