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

SWR matplotlib__matplotlib-5195 by richeshgupta · Pull Request #33 · razorpaytest/matplotlib · GitHub

Repository navigation

SWR matplotlib__matplotlib-5195 - #33

Open
richeshgupta wants to merge 1 commit into
swr-base-84aa9f7from
swr-head-84aa9f7
Open

richeshgupta wants to merge 1 commit into
swr-base-84aa9f7from
swr-head-84aa9f7

Conversation

Copy link
Copy Markdown

SWRBench case matplotlib__matplotlib-5195: pinned base 522c31c to head 84aa9f7 of matplotlib#5195. Benchmark replay, not for merge.

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

razorpay-slash Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Automated code review

Reviewed up to 84aa9f7.
All 5 reviewers completed.

_, SuperModifier, SuperKey = MODIFIER_KEYS[SUPER]
_, ShiftModifier, ShiftKey = MODIFIER_KEYS[SHIFT]
HAS_QT = True
py_qt_ver = int(QtCore.PYQT_VERSION_STR.split('.')[0])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

[MEDIUM] Qt test modules crash at collection under PySide (AttributeError on PYQT_VERSION_STR)

Issue

The 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.

Evidence

SUSPECTED: 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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL