Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support async cancellations. #726

Merged
merged 22 commits into from
Jul 4, 2023
Merged

Conversation

tomchristie
Copy link
Member

@tomchristie tomchristie commented Jun 15, 2023

  • 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.

@tomchristie tomchristie mentioned this pull request Jun 15, 2023
2 tasks
@tomchristie
Copy link
Member Author

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...

@tomchristie tomchristie changed the title Add 'AsyncShieldCancellation' context manager. Support async cancellations. Jun 26, 2023
@tomchristie
Copy link
Member Author

...Commenting continues.

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

@tomchristie tomchristie marked this pull request as ready for review June 26, 2023 18:59
@tomchristie tomchristie requested a review from a team June 26, 2023 18:59
tests/test_cancellations.py Outdated Show resolved Hide resolved
Copy link
Contributor

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@Pliner Pliner left a comment

Choose a reason for hiding this comment

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

Thanks 👍🏻

@karpetrosyan karpetrosyan mentioned this pull request Jul 3, 2023
1 task
@tomchristie tomchristie merged commit 31a4a56 into master Jul 4, 2023
5 checks passed
@tomchristie tomchristie deleted the add-shield-cancellation-primitive branch July 4, 2023 08:37
@tomchristie
Copy link
Member Author

tomchristie commented Jul 4, 2023

Thanks folks. 🙏🏼

bdraco added a commit to home-assistant/core that referenced this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support async cancellations.
5 participants