[issue46771] Add some form of cancel scopes
Alex Grönholm
report at bugs.python.org
Sun Feb 20 19:05:23 EST 2022
Alex Grönholm <alex.gronholm at nextday.fi> added the comment:
> Propagating an ExceptionGroup where every exception can be inspected to see if it was caused by this code or not still seems like the safe option to me (and obviously still has the cancel count implicitly).
Note that this, too, causes backwards incompatible changes in cancellation behavior. Previously, when the task was cancelled twice, only one CancelledError was raised. Now it would raise a BaseExceptionGroup instead.
The current backward incompatible changes in cancellation behavior are already causing 10 tests to fail in the AnyIO test suite. I'm trying to find an alternate solution that does not break anything.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46771>
_______________________________________
More information about the Python-bugs-list
mailing list