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

Support for PyQt6/PySide6.#19255

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
QuLogic merged 11 commits intomatplotlib:masterfromanntzer:qt6
Aug 5, 2021
Merged

Support for PyQt6/PySide6.#19255

QuLogic merged 11 commits intomatplotlib:masterfromanntzer:qt6
Aug 5, 2021

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedJan 7, 2021
edited
Loading

Currently these must be selected viaQT_API=pyqt6/QT_API=pyside6.

Note that I didn't create a separate backend_qt6agg (and
backend_qt6cairo, and mplcairo.qt6...) as it seems preferable to instead
move towards a single backend_qtagg and allow selection of the actual qt
binding via the orthogonal QT_API mechanism.

Most of the work is just handling attributes that moved out of the Qt
namespace (but the new locations are also compatible with Qt5).

Seehttps://www.riverbankcomputing.com/static/Docs/PyQt5/gotchas.html#enums
re: enum renames (sip 4.19.9 corresponds to PyQt5.13.1).

Just for those who want to play with this wrt#19226...

PR Summary

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

congzhangzh, cbrnr, t20100, Iddingsite, rmallow, and shenxingchao reacted with thumbs up emojistonebig, noonchen, NeilGirdhar, and shenxingchao reacted with heart emoji
@anntzeranntzer marked this pull request as draftJanuary 7, 2021 16:30
@anntzeranntzerforce-pushed theqt6 branch 2 times, most recently from46dbac2 toca3b175CompareJanuary 8, 2021 11:01
@timhoffmtimhoffm mentioned this pull requestJan 17, 2021
@anntzeranntzerforce-pushed theqt6 branch 3 times, most recently from25f5c9a tof61c7d4CompareJanuary 18, 2021 10:28
@anntzeranntzerforce-pushed theqt6 branch 2 times, most recently from87c7795 to237d660CompareJanuary 20, 2021 09:06
@anntzer
Copy link
ContributorAuthor

anntzer commentedJan 21, 2021
edited
Loading

Agreement was to switch to qtagg/qtcairo without version numbers (keeping qt5foo as aliases for backcompat). Will try to make it by next week to get it in 3.4 (but that's not urgent either).

(GTK will be handled separately, may require a fully separate backend.)

@anntzeranntzerforce-pushed theqt6 branch 9 times, most recently frome04add6 toe888368CompareJanuary 24, 2021 19:02
@anntzeranntzer changed the titleAdd "experimental" support for PyQt6/PySide6.Support for PyQt6/PySide6.Jan 24, 2021
@anntzer
Copy link
ContributorAuthor

anntzer commentedJan 24, 2021
edited
Loading

This should be working now (although I'm not sure about how much needs to be done on IPython's side).

Edit: hmm, CI is crashing but it's hard to see why :(

@tacaswell
Copy link
Member

I'm working on this right now, this should be in mpl 3.5.

joaorsbarbosa, NeilGirdhar, cbrnr, HDembinski, lorenzo522, milos-korenciak, mars0001, felipebogaertsm, vfrico, aryan-jain, and 2 more reacted with heart emoji

anntzerand others added9 commitsAugust 4, 2021 16:54
Currently these must be selected via `QT_API=pyqt6`/`QT_API=pyside6`.Note that I didn't create a separate backend_qt6agg (andbackend_qt6cairo, and mplcairo.qt6...) as it seems preferable to insteadmove towards a single backend_qtagg and allow selection of the actual qtbinding via the orthogonal QT_API mechanism.Most of the work is just handling attributes that moved out of the Qtnamespace.
Testing all qt bindings actually caught the fact that PySide makes thebackend not thread-safe.Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Also, PyGObjects built on different Ubuntus are incompatible, so thecache should be keyed by matrix.os (which includes the version number),not runner.os (which doesn't).
We do not exercise all of the code paths that call _enum in thetests.At least PyQt5 5.8 does not support the enums by name so we still need theversion gating.
Perfer to run with Qt6 if available
Just run with what ever version of PyQt we find.
Used to be parameterized, now just marked.  There is no backend fixture.
@cbrnr
Copy link
Contributor

cbrnr commentedAug 5, 2021
edited
Loading

Thanks@tacaswell, that's really great! Do you have an estimate when 3.5 will be available? Edit: The milestone is due August 18, so I guess that's the plan.

@QuLogic
Copy link
Member

@tacaswell:@anntzer's comment still needs fixing.

If pyqt4 is imported the code just above will catch the problem andif pyqt4 is not imported we can rely on `plt.switch_backend` to handlethe fallback between pyqt/pyside versions.
@tacaswelltacaswell mentioned this pull requestAug 5, 2021
5 tasks
@QuLogicQuLogic merged commitc34fa77 intomatplotlib:masterAug 5, 2021
@anntzeranntzer deleted the qt6 branchAugust 5, 2021 22:21
@larsonerlarsoner mentioned this pull requestSep 1, 2021
2 tasks
@tacaswelltacaswell mentioned this pull requestOct 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@QuLogicQuLogicQuLogic approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

9 participants
@anntzer@mfitzp@congzhangzh@stonebig@tacaswell@QuLogic@jklymak@cbrnr@joaorsbarbosa

[8]ページ先頭

©2009-2025 Movatter.jp