Fix rubberbanding on wx+py3.10.#21990
Merged
QuLogic merged 1 commit intomatplotlib:mainfrom Dec 17, 2021
Merged
Conversation
QuLogic
reviewed
Dec 17, 2021
QuLogic
approved these changes
Dec 17, 2021
Contributor
Author
|
Added a minimal smoketest for draw_rubberband. |
QuLogic
reviewed
Dec 17, 2021
Locally (Arch standard packages), it otherwise fails with
File "/usr/lib/python3.10/site-packages/wx/core.py", line 1098, in _DC_DrawLineList
return self._DrawLineList(lines, pens, [])
TypeError: 'numpy.float64' object cannot be interpreted as an integer
dstansby
reviewed
Dec 17, 2021
|
|
||
| ax.plot([0, 1], [2, 3]) | ||
| if fig.canvas.toolbar: # i.e toolbar2. | ||
| fig.canvas.toolbar.draw_rubberband(None, 1., 1, 2., 2) |
Member
There was a problem hiding this comment.
codecov claims this line isn't being tested - is that a CI issue or is the if statement never being executed anywhere?
Contributor
Author
There was a problem hiding this comment.
At least locally, I can confirm that this is indeed executed...
Member
There was a problem hiding this comment.
This line is run for all backends, and we skip a few, so it seems to be referring to that.
dstansby
approved these changes
Dec 17, 2021
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Dec 17, 2021
QuLogic
added a commit
that referenced
this pull request
Dec 18, 2021
…990-on-v3.5.x Backport PR #21990 on branch v3.5.x (Fix rubberbanding on wx+py3.10.)
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.
Locally (Arch standard packages), it otherwise fails with
File "/usr/lib/python3.10/site-packages/wx/core.py", line 1098, in _DC_DrawLineList
return self._DrawLineList(lines, pens, [])
TypeError: 'numpy.float64' object cannot be interpreted as an integer
Likely the same root cause as #19395.
PR Summary
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).