Skip to content

Support async cancellations. - #726

Merged
lovelydinosaur merged 22 commits into
masterfrom
add-shield-cancellation-primitive
Jul 4, 2023
Merged

Support async cancellations.#726
lovelydinosaur merged 22 commits into
masterfrom
add-shield-cancellation-primitive

Conversation

@lovelydinosaur

@lovelydinosaurlovelydinosaur commented Jun 15, 2023

Copy link
Copy Markdown
Contributor
  • Add an AsyncShieldCancellation context manager.
  • Unit test HTTP/1.1 timeouts on connections.
  • Unit test HTTP/2 timeouts on connections.
  • Test timeouts on connection pools
  • Add to CHANGELOG.

Closes#642.

See also #719.

Comment threadhttpcore/_synchronization.py Outdated
@lovelydinosaurlovelydinosaur mentioned this pull request Jun 15, 2023
2 tasks
Comment threadhttpcore/_synchronization.py
Comment threadhttpcore/_synchronization.py Outdated
@lovelydinosaur

Copy link
Copy Markdown
ContributorAuthor

Commenting to show work-in-progress.

At this point I've...

  • Added the context manager.
  • Put pragma: nocover on it so that it doesn't cause coverage to fail, and we can observe that the existing tests are all passing.

Next up...

@lovelydinosaurlovelydinosaur changed the title Add 'AsyncShieldCancellation' context manager.Support async cancellations.Jun 26, 2023
@lovelydinosaur

Copy link
Copy Markdown
ContributorAuthor

...Commenting continues.

At this point I've started incrementally adding in failing tests, and then resolving them. Looking good.

@lovelydinosaur
lovelydinosaur marked this pull request as ready for review June 26, 2023 18:59
@lovelydinosaur
lovelydinosaur requested a review from a teamJune 26, 2023 18:59
Comment threadtests/test_cancellations.py Outdated

@zaniebzanieb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@PlinerPliner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍🏻

Comment threadhttpcore/_async/http11.py
@karpetrosyankarpetrosyan mentioned this pull request Jul 3, 2023
1 task
@lovelydinosaur
lovelydinosaur merged commit 31a4a56 into masterJul 4, 2023
@lovelydinosaur
lovelydinosaur deleted the add-shield-cancellation-primitive branch July 4, 2023 08:37
@lovelydinosaur

lovelydinosaur commented Jul 4, 2023

Copy link
Copy Markdown
ContributorAuthor

Thanks folks. 🙏🏼

bdraco added a commit to home-assistant/core that referenced this pull request Jul 21, 2023
@T-256T-256 mentioned this pull request Sep 20, 2023
3 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Support async cancellations.

5 participants

@lovelydinosaur@graingert@Pliner@zanieb@karpetrosyan