Changes in mouse event

Hi folks,
I am using matplotlib on debian unstable with Gtk (or gtkagg sometimes)
backend. Since the last update I have some troubles with the stop mouse
event in the ginput function:

$ python
Python 2.5.4 (r254:67916, Sep 26 2009, 08:19:36)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import matplotlib.pyplot as plt
plt.plot([1,2.,34.])

/usr/lib/pymodules/python2.5/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip
  self.tooltips = gtk.Tooltips()
[<matplotlib.lines.Line2D object at 0xa091f4c>]

plt.ginput(n=0)

/usr/lib/pymodules/python2.5/matplotlib/backend_bases.py:1624: DeprecationWarning: Using default event loop until function specific to this GUI is implemented
  warnings.warn(str,DeprecationWarning)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/matplotlib/backends/backend_gtk.py", line 208, in button_press_event
    FigureCanvasBase.button_press_event(self, x, y, event.button, guiEvent=event)
  File "/usr/lib/pymodules/python2.5/matplotlib/backend_bases.py", line 1196, in button_press_event
    self.callbacks.process(s, mouseevent)
  File "/usr/lib/pymodules/python2.5/matplotlib/cbook.py", line 163, in process
    func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.5/matplotlib/blocking_input.py", line 46, in on_event
    self.post_event()
  File "/usr/lib/pymodules/python2.5/matplotlib/blocking_input.py", line 142, in post_event
    self.mouse_event()
  File "/usr/lib/pymodules/python2.5/matplotlib/blocking_input.py", line 153, in mouse_event
    self.mouse_event_stop(event)
  File "/usr/lib/pymodules/python2.5/matplotlib/blocking_input.py", line 196, in mouse_event_stop
    self.fig.canvas.stop_event_loop(event)
TypeError: stop_event_loop() takes exactly 1 argument (2 given)
[(0.44261065266316579, 6.9299095607235142), (1.3628407101775444, 16.765180878552972)]

In fact, I mentioned the argument n=0 to have an arbitrary of input
points, but when I press enter or middle-click to end the acquisition,
the exception raises. After the 30s default timeout, the selected points
are output.

Is it a bug related to the changes in 7591 ?

···

--
Fabrice Silva
Laboratory of Mechanics and Acoustics - CNRS
31 chemin Joseph Aiguier, 13402 Marseille, France.

r7591 introduced an extra argument in the call of
fig.canvas.stop_event_loop in the mouse_event_stop method of the
BlockingMouseInput class (in blocking_input.py line 199).

But, in the GTK backend, fig.canvas.stop_event_loop only takes the
instance object as input.
I can't figure out whether the change in r7591 is linked to a change in
a particular backend other than GTK*...

···

--
Fabrice Silva
Laboratory of Mechanics and Acoustics - CNRS
31 chemin Joseph Aiguier, 13402 Marseille, France.