-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Respect QT_API even when the backend is not Qt{4,5}{Agg,Cairo}. #12091
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
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.
@@ -41,13 +46,13 @@ | |||
# Otherwise, check the QT_API environment variable (from Enthought). This can | |||
# 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"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would .startswith("Qt5")
be better here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
… not Qt{4,5}{Agg,Cairo}.
… not Qt{4,5}{Agg,Cairo}.
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. |
…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}.)
…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}.)
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