-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
5141781
to
14d625e
Compare
@@ -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)) |
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.
backcompatibility against what?
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.
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!
if any(sys.modules.get(k) for k in ('PyQt4', 'PySide')): | ||
pytest.skip('Qt4 binding already imported') |
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.
confused about why this is still 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.
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.
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.
Yea, it shouldn't happen because this is part of our test suite, but I left it in just-in-case, as @tacaswell said.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).