Skip to content

SWR matplotlib__matplotlib-9169 - #151

Open
richeshgupta wants to merge 2 commits into
swr-base-52eb8b8from
swr-head-52eb8b8
Open

richeshgupta wants to merge 2 commits into
swr-base-52eb8b8from
swr-head-52eb8b8

Conversation

@richeshgupta

Copy link
Copy Markdown

SWRBench case matplotlib__matplotlib-9169: pinned base d02024e to head 52eb8b8 of matplotlib#9169. Benchmark replay, not for merge.

@razorpay-slash 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.

Automated code review

Reviewed up to 52eb8b8.
All 5 reviewers completed.

except AttributeError:
pass
# Restore __init__
QtWidgets.QWidget.__init__ = qwidget_init

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MEDIUM] No test covers the new QWidget.init restoration or the bytes QApplication argument

Issue

The old code swallowed the AttributeError from del QtWidgets.QWidget.__init__, leaving the monkeypatched cooperative_qwidget_init installed on QWidget for the life of the process, and this diff fixes that. No test can fail on the pre-fix code because the leaked wrapper is a transparent passthrough, and the bytes argv change in _create_qApp is likewise exercised by no test in this diff.

Evidence

SUSPECTED: A test in lib/matplotlib/tests/test_backend_qt5.py that creates a qt5 figure with no pre-existing QApplication, then asserts QtWidgets.QWidget.__init__ is no longer cooperative_qwidget_init, would fail on the pre-fix code and would also pin the bytes argv.

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