Marco Pagliaricci <pagliaricc...@gmail.com> added the comment:
Andrew, many thanks for your time, solving this issue. I think your solution is the best to fix this little problem and I agree with you on backporting. My Best Regards, and thanks again. Marco On Thu, Feb 17, 2022 at 10:29 AM Andrew Svetlov <rep...@bugs.python.org> wrote: > > 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 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