Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 1 commit intomatplotlib:masterfromanntzer:qt_compat
Sep 12, 2018

Conversation

anntzer
Copy link
Contributor

  • 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.

Note: before#9993, we would follow QT_API in the non-qt-backend caseonly 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

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

- 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"]:
Copy link
Member

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?

Copy link
ContributorAuthor

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.

@tacaswelltacaswell added this to thev2.2.4 milestoneSep 12, 2018
@tacaswelltacaswell merged commitd281b94 intomatplotlib:masterSep 12, 2018
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 12, 2018
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 12, 2018
@anntzeranntzer deleted the qt_compat branchSeptember 12, 2018 02:18
@Carreau
Copy link
Contributor

I've updated the backport code to no erase the local repository and re-clone every time a backport is done, so backportshould 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 requestSep 12, 2018
…091-on-v3.0.xBackport 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 requestSep 12, 2018
…091-on-v2.2.xBackport PR#12091 on branch v2.2.x (Respect QT_API even when the backend is not Qt{4,5}{Agg,Cairo}.)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell left review comments

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v2.2.4
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@Carreau@tacaswell@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp