-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[TST] Qt/Pyside 6.5.1 dependency test failures #25988
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
Comments
This seems to be something to do with the PySide6 release earlier today. |
I can reproduce this locally, and the timer works, is called, the quit key is triggered, and the script exits, but something appears wrong getting the close event. |
FWICT, the problem seems to be mixed signals across multiple figures. The test in question has a second portion (for Agg-based backends only, which is why Cairo ones don't fail) which opens a figure to lock in the backend, then attempts to switch backends and confirm that it fails. This occurs before running the main test of opening a window, and closing it after the first draw event. In that case, the Matplotlib side does correctly close the Qt window, but the Using this patch to run a copy of the test: diff --git a/lib/matplotlib/backends/backend_qt.py b/lib/matplotlib/backends/backend_qt.py
index faeb0d6bb7..4cfa294c6e 100644
--- a/lib/matplotlib/backends/backend_qt.py
+++ b/lib/matplotlib/backends/backend_qt.py
@@ -501,6 +501,7 @@ class MainWindow(QtWidgets.QMainWindow):
closing = QtCore.Signal()
def closeEvent(self, event):
+ print('closeEvent', self, event, self.closing)
self.closing.emit()
super().closeEvent(event)
@@ -522,9 +523,11 @@ class FigureManagerQT(FigureManagerBase):
def __init__(self, canvas, num):
self.window = MainWindow()
super().__init__(canvas, num)
- self.window.closing.connect(
- # The lambda prevents the event from being immediately gc'd.
- lambda: CloseEvent("close_event", self.canvas)._process())
+ print('Creating new figure manager', self, canvas, num, self.window, self.window.closing)
+ def foo():
+ print('close event is happening!', self, self.canvas, self.window)
+ CloseEvent("close_event", self.canvas)._process()
+ self.window.closing.connect(foo)
self.window.closing.connect(self._widgetclosed)
if sys.platform != "darwin":
@@ -604,6 +607,7 @@ class FigureManagerQT(FigureManagerBase):
self.window.raise_()
def destroy(self, *args):
+ print('FigureManagerQT.destroy', self, self.window)
# check for qApp first, as PySide deletes it in its atexit handler
if QtWidgets.QApplication.instance() is None:
return outputs:
The second figure has a |
Looks like there's an upstream issue for this here: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346 and https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2348 |
xref for pyqtgraph also having failures on pyside 6.5.1, seems at least overlapping root cause: |
Ah, interesting. We have two handlers for the Merging them does seem to fix the problem, so I'll try to audit all the signal connections to ensure that's the only place it's needed. |
There's another case of a handler with local capture in tool manager: matplotlib/lib/matplotlib/backends/backend_qt.py Lines 937 to 943 in d464cbf
I'm not sure if it's possible for us to avoid that one. |
(renamed to make it more discoverable as an issue since there is some conversation/notes here) |
The weekly build with nightly wheels from numpy and pandas
has failed. Check the logs for any updates that need to be
made in matplotlib.
https://github.com/matplotlib/matplotlib/actions/runs/5097297090
The text was updated successfully, but these errors were encountered: