8000 Remove deprecated Qt4 backends by QuLogic · Pull Request #19894 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove deprecated Qt4 backends #19894

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

Merged
merged 3 commits into from
May 15, 2021
Merged

Conversation

QuLogic
Copy link
Member
@QuLogic QuLogic commented Apr 7, 2021

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [n/a] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@QuLogic QuLogic added this to the v3.5.0 milestone Apr 7, 2021
@QuLogic QuLogic force-pushed the remove-qt4 branch 2 times, most recently from 5141781 to 14d625e Compare April 7, 2021 22:37
@@ -193,14 +109,10 @@ def is_pyqt5():


# These globals are only defined for backcompatibility purposes.
ETS = dict(pyqt=(QT_API_PYQTv2, 4), pyside=(QT_API_PYSIDE, 4),
pyqt5=(QT_API_PYQT5, 5), pyside2=(QT_API_PYSIDE2, 5))
ETS = dict(pyqt5=(QT_API_PYQT5, 5), pyside2=(QT_API_PYSIDE2, 5))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backcompatibility against what?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that some people who do qt application embedding import qt through Matplotlib (that way your Qt binding and Matplotlib's Qt bindings are always the same ;) ). Who knows what they are using from this module so even though we no longer use this (ETS is a reference to enthought and their convention of controling which qt bindings to use which I assume we followed so that we would stay in sync with traitui and friends if used together).

We still follow their env convention (see around L30), but no longer use this particular data structure as part of the mapping. It is less work to carry around an extra dictionary than it is to deprecate it!

Comment on lines 51 to 52
if any(sys.modules.get(k) for k in ('PyQt4', 'PySide')):
pytest.skip('Qt4 binding already imported')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confused about why this is still here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though we no longer support pyqt5, if pyqt4 or pyside are imported, pyqt5 will not import (due to conflicts at the c++ level between thee versions of Qt) so it is worth keeping this out of an abundance of caution.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, it shouldn't happen because this is part of our test suite, but I left it in just-in-case, as @tacaswell said.

@tacaswell tacaswell merged commit 3bf56aa into matplotlib:master May 15, 2021
@QuLogic QuLogic deleted the remove-qt4 branch May 17, 2021 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0