From f6dd3b037c1e2d8e2394132cce7ec4bc13cde695 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 6 Jun 2017 00:59:55 -0700 Subject: [PATCH] No longer connect to idle event on wx. --- doc/api/api_changes/2017-06-06-AL_wxidle.rst | 7 +++++++ lib/matplotlib/backends/backend_wx.py | 6 ------ lib/matplotlib/tests/test_backends_interactive.py | 3 --- 3 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 doc/api/api_changes/2017-06-06-AL_wxidle.rst diff --git a/doc/api/api_changes/2017-06-06-AL_wxidle.rst b/doc/api/api_changes/2017-06-06-AL_wxidle.rst new file mode 100644 index 000000000000..d34171d01e18 --- /dev/null +++ b/doc/api/api_changes/2017-06-06-AL_wxidle.rst @@ -0,0 +1,7 @@ +WX no longer calls generates ``IdleEvent`` events or calls ``idle_event`` +````````````````````````````````````````````````````````````````````````` + +Removed unused private method ``_onIdle`` from ``FigureCanvasWx``. + +The ``IdleEvent`` class and ``FigureCanvasBase.idle_event`` method +will be removed in 2.2 diff --git a/lib/matplotlib/backends/backend_wx.py b/lib/matplotlib/backends/backend_wx.py index 8746b9034cbd..d5d8ab051122 100644 --- a/lib/matplotlib/backends/backend_wx.py +++ b/lib/matplotlib/backends/backend_wx.py @@ -678,7 +678,6 @@ def do_nothing(*args, **kwargs): self.Bind(wx.EVT_MOTION, self._onMotion) self.Bind(wx.EVT_LEAVE_WINDOW, self._onLeave) self.Bind(wx.EVT_ENTER_WINDOW, self._onEnter) - self.Bind(wx.EVT_IDLE, self._onIdle) # Add middle button events self.Bind(wx.EVT_MIDDLE_DOWN, self._onMiddleButtonDown) self.Bind(wx.EVT_MIDDLE_DCLICK, self._onMiddleButtonDClick) @@ -1007,11 +1006,6 @@ def _get_key(self, evt): return key - def _onIdle(self, evt): - 'a GUI idle event' - evt.Skip() - FigureCanvasBase.idle_event(self, guiEvent=evt) - def _onKeyDown(self, evt): """Capture key press.""" key = self._get_key(evt) diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py index c9409f5b7494..2db2fb5de07b 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -10,9 +10,6 @@ # PyPI-installable on Travis. They are not available for all tested Python # versions so we don't fail on missing backends. # -# Once the Travis build environment switches to Ubuntu 14.04, we should be able -# to add wxagg (which has wheels for 14.04 but not for 12.04). -# # We also don't test on Py2 because its subprocess module doesn't support # timeouts, and it would require a separate code path to check for module # existence without actually trying to import the module (which may install