Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b50e49

Browse filesBrowse files
authored
Merge pull request #9169 from t20100/fix-restore-init-pyside
Fix matplotlib corrupting PySide
2 parents f945eca + 52eb8b8 commit 4b50e49
Copy full SHA for 4b50e49

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _create_qApp():
121121
if display is None or not re.search(r':\d', display):
122122
raise RuntimeError('Invalid DISPLAY variable')
123123

124-
qApp = QtWidgets.QApplication(["matplotlib"])
124+
qApp = QtWidgets.QApplication([b"matplotlib"])
125125
qApp.lastWindowClosed.connect(qApp.quit)
126126
else:
127127
qApp = app
@@ -170,11 +170,8 @@ def wrapper(self, **kwargs):
170170
QtWidgets.QWidget.__init__ = cooperative_qwidget_init
171171
__init__(self, **kwargs)
172172
finally:
173-
try:
174-
# Restore __init__ to sip.simplewrapper.__init__.
175-
del QtWidgets.QWidget.__init__
176-
except AttributeError:
177-
pass
173+
# Restore __init__
174+
QtWidgets.QWidget.__init__ = qwidget_init
178175

179176
return wrapper
180177

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.