| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Complete cancellation propagation now that the driver supports protocol aborts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c3c85ae6-2b5f-4f50-9158-ce3c886f750a
| Back | FazBrowse Home | New Git URL |
This implements the follow-up left in #3134 and finishes the cancellation behaviour introduced in #1236.
#1236 made cancelled asyncio tasks cancel their local protocol callback. The stated intention was to propagate cancellation to the protocol call, but the driver operation kept running because the protocol couldn't abort it yet.
With __abort__, cancelling a task now stops the driver operation and waits for its protocol response before re-raising CancelledError. This follows asyncio's guidance to propagate cancellation after cleanup completes.
This is an observable behaviour change: previously, a cancelled action could still happen later. Users who intentionally want an operation to outlive its caller can run it in a separate task and protect it with asyncio.shield().
The regression test blocks a click, cancels it, unblocks the button, and verifies that it stays unclicked.