Skip to content
Snippets Groups Projects
Unverified Commit d0fc1e90 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Fix cancellation tests with new Twisted. (#17906)

The latest Twisted release changed how they implemented `__await__` on
deferreds, which broke the machinery we used to test cancellation.

This PR changes things a bit to instead patch the `__await__` method,
which is a stable API. This mostly doesn't change the core logic, except
for fixing two bugs:
  - We previously did not intercept all await points
- After cancellation we now need to not only unblock currently blocked
await points, but also make sure we don't block any future await points.

c.f. https://github.com/twisted/twisted/pull/12226



---------

Co-authored-by: default avatarDevon Hudson <devon.dmytro@gmail.com>
parent 77eafd47
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment