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

Ignore CancelledErrors because of Python 3.7 #2891

Closed
wants to merge 3 commits into from

Conversation

rodrigogiraoserrao
Copy link
Contributor

This fixes #2854 by ignoring the CancelledError.

@rodrigogiraoserrao rodrigogiraoserrao self-assigned this Jul 5, 2023
@rodrigogiraoserrao rodrigogiraoserrao added the bug Something isn't working label Jul 5, 2023
@willmcgugan
Copy link
Collaborator

On consideration, this is unlikely to be the right fix. You could get in to a situation where cancelling a widget's task would get swallowed if it happens to be awaiting a remove.

I think what is happening is that Python3.7 raises an erroneous CancelledError when waiting a lock that has been cancelled.

The solution may be to explicitly handle CancelledError in prune_widgets_task and set the lock there.

@rodrigogiraoserrao
Copy link
Contributor Author

Closed in favour of #2895

@rodrigogiraoserrao rodrigogiraoserrao deleted the await-remove branch September 19, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CancelledError when doing a self.remove from a timer (in Python 3.7 but not Python 3.11)
2 participants