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

fix: Fix some swallowed CancelledError #6625

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cbornet
Copy link
Collaborator

@cbornet cbornet commented Feb 14, 2025

CancelledError should never be swallowed (unless uncancel is used).
See https://docs.python.org/3/library/asyncio-task.html#task-cancellation

In case asyncio.CancelledError is explicitly caught, it should generally be propagated when clean-up is complete.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 14, 2025
@cbornet cbornet requested a review from ogabrielluiz February 14, 2025 16:51
@dosubot dosubot bot added the bug Something isn't working label Feb 14, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 14, 2025
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

That's great. I fought a CancelledError for a long time yesterday.

Thank you!

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 14, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants