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

[python] Make detection of TimeoutError compatible with 3.10. #19308

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

stellaraccident
Copy link
Collaborator

  • In python < 3.11, future methods throw concurrent.futures.TimeoutError.
  • In python 3.11, concurrent.futures.TimeoutError is a subclass of TimeoutError and the former is deprecated.
  • In python 3.10, TimeoutError exists so can have an except clause, but it is not thrown by futures.

* In python < 3.11, future methods throw concurrent.futures.TimeoutError.
* In python 3.11, concurrent.futures.TimeoutError is a subclass of TimeoutError and the former is deprecated.
* In python 3.10, TimeoutError exists so can have an except clause, but it is not thrown by futures.

Signed-off-by: Stella Laurenzo <[email protected]>
Signed-off-by: Stella Laurenzo <[email protected]>
Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

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

I've run this locally and it works now. Thanks!

@stellaraccident stellaraccident merged commit 5708d42 into main Nov 26, 2024
40 checks passed
@stellaraccident stellaraccident deleted the python_timeout_error_310 branch November 26, 2024 22:08
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.

2 participants