[issue45098] asyncio.CancelledError should contain more information on cancellations

2022-03-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: #46829 deprecates cancellation messages. #46771 implements timeout context manager based on previously added cancellation counter and task.uncancel() I think this issue should be closed. -- resolution: -> rejected stage: -> resolved status: open ->

[issue45098] asyncio.CancelledError should contain more information on cancellations

2022-02-19 Thread Sam Bull
Sam Bull added the comment: I think there's still a problem, in that the user still expects a task to be cancelled in the example previously: https://github.com/aio-libs/async-timeout/issues/229#issuecomment-908502523 If we encounter the race condition where the timeout cancels the task and

[issue45098] asyncio.CancelledError should contain more information on cancellations

2022-02-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: After TaskGroup merging, the second `cancel()` call returns `False` and doesn't initiate the actual cancellation if it was scheduled by the first `cancel()` call. I believe it "fixes" async-timeout: the first canceller wins. --

[issue45098] asyncio.CancelledError should contain more information on cancellations

2021-09-04 Thread Sam Bull
New submission from Sam Bull : There are awkward edge cases caused by race conditions when cancelling tasks which make it impossible to reliably cancel a task. For example, in the async-timeout library there appears to be no way to avoid suppressing an explicit t.cancel() if that cancellation