FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

consider using qtpy for qt abstraction layer · Issue #6118 · matplotlib/matplotlib · GitHub

Repository navigation

consider using qtpy for qt abstraction layer #6118

Closed

Description

Instead of rolling our own, use https://github.com/spyder-ide/qtpy

The proposal would be to replace our qt_compat.py almost wholesale with qtpy imports.

Activity

  1. added this to the milestone on Mar 6, 2016
  2. jenshnielsen commented on Mar 7, 2016

    Member

    Sounds like a very good idea to me

  3. mdboom commented on Mar 7, 2016

    Member

    Yes. Spyder's needs of Qt are much more complex than ours, so I suspect it should do everything we need it to do.

  4. tacaswell commented on May 8, 2017

    MemberAuthor

    spyder-ide/qtpy#84 <- they now support pyside2 so are back to wrapping parity.

  5. modified the milestones: , on Oct 3, 2017
  6. anntzer commented on Dec 13, 2017

    Contributor

    See #9993 (comment) for arguments against it.

  7. anntzer commented on Jan 30, 2018

    Contributor

    I think spyder-ide/qtpy#138 needs to be fixed first by them.

    Edit: my PR to fix the issue went in.

  8. modified the milestones: , on Feb 13, 2018
  9. anntzer commented on Jun 19, 2018

    Contributor

    Upon further thought, I am against switching to qtpy. The main reason for this is that we already don't declare a dependency on any qt binding, and I guess we wouldn't declare a dependency on qtpy either. Likewise, qtpy does not (by design) declare a dependency on any qt binding. The end result is that you'd have to add yet another manual dependency management step for whoever wants to install matplotlib+qt from pypi.

  10. timhoffm commented on Jun 20, 2018

    Member

    Not sure if this really works and is an accepted way of doing things, but could we create a placeholder package matplotlib-qt, that will basically only resolve the required dependencies when installing it with pip?

  11. anntzer commented on Jun 20, 2018

    Contributor

    That doesn't really help, as the main sticking point is that multiple underlying qt bindings are supported (unless you want to create matplotlib-pyqt4, matplotlib-pyqt5, matplotlib-pyside, matplotlib-pyside2, but meh).

  12. 1 remaining item

  13. tacaswell commented on Jun 20, 2018

    MemberAuthor

    We have to keep supporting all the qt bindings and probably should not pick an (official) favorite. We definitely can not pick up any dependencies on GUI bindings on pypi by default. We probably should be using the 'extras' part of setup.py a bit more effectively though to support pip install matplotlib[pyside2] etc.

    The advantage of moving to qtpy is that we can deprecate all of our binding selection logic and off-load it to qtpy. We are then automatically in sync with any other project that uses qtpy (there is nothing more frustrating that trying to use more than one package that is opinionated about how to import qt bindings....).

  14. modified the milestones: v3.0, v3.1 on Jun 20, 2018
  15. anntzer commented on Jun 21, 2018

    Contributor

    The advantage of moving to qtpy is that we can deprecate all of our binding selection logic and off-load it to qtpy. We are then automatically in sync with any other project that uses qtpy (there is nothing more frustrating that trying to use more than one package that is opinionated about how to import qt bindings....).

    I think this would only be true if you decide to kill the qt4agg and qt5agg backends and replace them by a single qtagg backend, because otherwise we would still need to maintain code to override the backend selection logic to force either qt4 (pyqt4/pyside) or qt5 (pyqt5/pyside2). (TBH I actually wouldn't mind doing such a deprecation, but I won't be the one making the call...)

  16. modified the milestones: v3.1.0, v3.2.0 on Feb 5, 2019
  17. modified the milestones: v3.2.0, v3.3.0 on Aug 16, 2019
  18. modified the milestones: v3.3.0, v3.4.0 on May 7, 2020
  19. timhoffm commented on Jul 14, 2020

    Member

    Is this still needed now that Qt4 is deprecated since Matplotlib 3.3?

  20. QuLogic commented on Jul 15, 2020

    Member

    Depends on how Qt6 goes, I guess?

  21. timhoffm commented on Jul 15, 2020

    Member

    Do we need to/would this cover also PySide2? I not I propose to close this as Qt6 is not yet there and we don't need to hold the PR open just in case it may become relevant.

  22. efiring commented on Jul 15, 2020

    Member

    Closing. The last discussion was 2 years ago. If new reasons to switch to qtpy arise, a new issue can be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGUI: Qt

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL