| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This issue is that the new 'default' qt version is 5 if it is available. In the tests the backend is Agg so we are hitting the fall through behavior. If both pyqt4 and pyqt5 are installed, then `QtCore` will be from PyQt5, but the backend_qt4Agg code assumes that it is seeing the PyQt4 version of the classes. This results in error on `__init__` due to the change between PyQt4 and PyQt5. Added test_backend_qt5.py to white listed tests. closes matplotlib#5194
| _, SuperModifier, SuperKey = MODIFIER_KEYS[SUPER] | ||
| _, ShiftModifier, ShiftKey = MODIFIER_KEYS[SHIFT] | ||
| HAS_QT = True | ||
| py_qt_ver = int(QtCore.PYQT_VERSION_STR.split('.')[0]) |
There was a problem hiding this comment.
[MEDIUM] Qt test modules crash at collection under PySide (AttributeError on PYQT_VERSION_STR)
IssueThe new version probe reads QtCore.PYQT_VERSION_STR, which does not exist when qt_compat has bound PySide, and the surrounding except ImportError does not catch the resulting AttributeError, so the module fails at import instead of setting HAS_QT = False. The identical added line in test_backend_qt4.py (line 28) breaks that already-enrolled module the same way, and with test_backend_qt5 now registered in the default suite in __init__.py, matplotlib.test() errors at collection for PySide users.
EvidenceSUSPECTED: install PySide as the only Qt binding and run the qt4/qt5 test modules; collection fails with AttributeError: 'module' object has no attribute 'PYQT_VERSION_STR' at import. That except ImportError cannot catch AttributeError is provable from the diff alone.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
SWRBench case matplotlib__matplotlib-5195: pinned base 522c31c to head 84aa9f7 of matplotlib#5195. Benchmark replay, not for merge.