Andrew Svetlov <andrew.svet...@gmail.com> added the comment:

I have a pull request for the issue.
It doesn't use `Future.set_exception()` but creates a new CancelledError() with 
propagated message.
The result is the same, except raised exceptions are not comparable by `is` 
check.
As a benefit, `_cancelled_exc` works with the patch, exc.__context__ is 
correctly set.

The patch is not backported because it changes existing behavior a little. I'd 
like to avoid a situation when third-party code works with Python 3.11+, 
3.10.3+, and 3.9.11+ only.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to