Respect QT_API even when the backend is not Qt{4,5}{Agg,Cairo}.#12091
Merged
Conversation
- When rcParams["backend"] was not QtXAgg, we previously ignored QT_API. Don't do so anymore. (example: mplcairo.qt...) - Also add the QtCairo backends to the checks.
timhoffm
approved these changes
Sep 11, 2018
tacaswell
reviewed
Sep 11, 2018
| # only override the binding, not the backend (in other words, we check that the | ||
| # requested backend actually matches). | ||
| elif rcParams["backend"] == "Qt5Agg": | ||
| elif rcParams["backend"] in ["Qt5Agg", "Qt5Cairo"]: |
Member
There was a problem hiding this comment.
would .startswith("Qt5") be better here?
Contributor
Author
There was a problem hiding this comment.
Doesn't really help with mplcairo... and I think we can revisit this if a third rendering backend ever show up :)
(In a sense the whole Qt4/5 setup is a bit weird, basically what we really have is just a Qt{Agg,Cair} backend and the 4/5 part just sets the default for QT_API.)
Anyways I don't feel strongly either way.
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Sep 12, 2018
… not Qt{4,5}{Agg,Cairo}.
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Sep 12, 2018
… not Qt{4,5}{Agg,Cairo}.
Contributor
|
I've updated the backport code to no erase the local repository and re-clone every time a backport is done, so backport should regularly be much faster (seconds instead os minutes for matplotlib). This PR was the first to use the new backport code, and apparently went great. Let me know if there is any issues. |
jklymak
added a commit
that referenced
this pull request
Sep 12, 2018
…091-on-v3.0.x Backport PR #12091 on branch v3.0.x (Respect QT_API even when the backend is not Qt{4,5}{Agg,Cairo}.)
jklymak
added a commit
that referenced
this pull request
Sep 12, 2018
…091-on-v2.2.x Backport PR #12091 on branch v2.2.x (Respect QT_API even when the backend is not Qt{4,5}{Agg,Cairo}.)
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.
Don't do so anymore. (example: mplcairo.qt...)
Note: before #9993, we would follow QT_API in the non-qt-backend case only if it specified a qt5 binding (PyQt5 or PySide2) -- per the default value of QT_RC_MAJOR_VERSION (so #9993 is a partial regression, also in 2.2.3).
I don't think this is critical to hold up 3.0 (as no one seems to have noticed this in 2.2.3 :)), but should be backported to 2.2.4.
PR Summary
PR Checklist