Time out in _get_executable_info#30256
Merged
anntzer merged 1 commit intomatplotlib:mainfrom Jul 4, 2025
Merged
Conversation
e095401 to
38a4c3b
Compare
QuLogic
reviewed
Jul 3, 2025
|
|
||
|
|
||
| @patch('matplotlib.subprocess.check_output') | ||
| def test_get_executable_info_timeout(mock_check_output): |
Member
There was a problem hiding this comment.
You could use monkeypatch here, though I have no preference here.
066ecd9 to
50f6881
Compare
QuLogic
approved these changes
Jul 4, 2025
anntzer
reviewed
Jul 4, 2025
| mock_check_output.side_effect = subprocess.TimeoutExpired(cmd=['mock'], timeout=30) | ||
|
|
||
| with pytest.raises(matplotlib.ExecutableNotFoundError, match='Timed out'): | ||
| print(matplotlib._get_executable_info.__wrapped__('inkscape')) |
Contributor
There was a problem hiding this comment.
the print is a bit weird here (even though it will not actually ever run, of course -- it just statically reads weird to me)
Member
Author
There was a problem hiding this comment.
I found it useful when trying to get the patch argument right, but of course it isn't necessary now.
Time out after 30 seconds. This is used for version queries which should be very fast, so a 30-second delay would be unusual. GitHub Actions test runs have been hanging trying to get the inkscape version when using Python 3.14: https://github.com/matplotlib/matplotlib/actions/runs/16043158943/job/45268507848#step:13:836
50f6881 to
6a01311
Compare
anntzer
approved these changes
Jul 4, 2025
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Jul 4, 2025
QuLogic
added a commit
that referenced
this pull request
Jul 4, 2025
…256-on-v3.10.x Backport PR #30256 on branch v3.10.x (Time out in _get_executable_info)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Time out after 30 seconds. This is used for version queries which
should be very fast, so a 30-second delay would be unusual.
GitHub Actions test runs have been hanging trying to get the
inkscape version when using Python 3.14:
https://github.com/matplotlib/matplotlib/actions/runs/16043158943/job/45268507848#step:13:836
PR summary
PR checklist