[IPython-user] IPython 0.7.0.rc1, and development...

[ I'm cc-ing the matplotlib list here, in case anyone can help us with this one. The context is: testing the new ipython release candidate from

http://ipython.scipy.org/dist/testing/

Charlie is havig problems with -pylab and the gtk backend.]

Hi Charlie,

Charlie Moad wrote:

     First of all, thanks as always. I can't remember the last time I
have used the vanilla python shell.
     I am trying the rc, and I get 100% cpu usage just by running
ipython -pylab. This is on ubuntu/mpl-cvs/gtkagg.

This has been reported before, and I am not yet sure if the problem is ipython or matplotlib. Unfortunately, on all of my boxes, matplotlib/gtkagg just segfaults instantly, so I can't even debug this one.

Help me a little: can you please test back and forth ipython 0.6.15 and 0.7.0.rc, without changing anything else? Is the problem ONLY with 0.7.0?

If that is the case, then I can try to track down what the threading call causing the problem might be. IPython has no C code in it, it only initializes the threads system for GTK, but perhaps I'm making an incorrect call there.

Any help here would be very welcome.

Cheers,

f

Works fine with 0.6.15, but it spins with 0.7.0. It does work with
0.7.0, but it just busy waits. 0.6.15 gives a warning:

/usr/lib/python2.4/site-packages/ipython-0.6.15-py2.4.egg/IPython/Shell.py:627:
GtkDeprecationWarning: gtk.timeout_add is deprecated, use
gobject.timeout_add instead
  self.gtk.timeout_add(self.TIMEOUT, self.on_timer)

I will try to look into it some more.

- Charlie

···

On 1/4/06, Fernando Perez <Fernando.Perez@...76...> wrote:

[ I'm cc-ing the matplotlib list here, in case anyone can help us with this
one. The context is: testing the new ipython release candidate from

http://ipython.scipy.org/dist/testing/

Charlie is havig problems with -pylab and the gtk backend.]

Hi Charlie,

Charlie Moad wrote:
> First of all, thanks as always. I can't remember the last time I
> have used the vanilla python shell.
> I am trying the rc, and I get 100% cpu usage just by running
> ipython -pylab. This is on ubuntu/mpl-cvs/gtkagg.

This has been reported before, and I am not yet sure if the problem is ipython
or matplotlib. Unfortunately, on all of my boxes, matplotlib/gtkagg just
segfaults instantly, so I can't even debug this one.

Help me a little: can you please test back and forth ipython 0.6.15 and
0.7.0.rc, without changing anything else? Is the problem ONLY with 0.7.0?

If that is the case, then I can try to track down what the threading call
causing the problem might be. IPython has no C code in it, it only
initializes the threads system for GTK, but perhaps I'm making an incorrect
call there.

Any help here would be very welcome.

Cheers,

f

Hi Fernando, Charlie,

I just updated my svn checkout, and can confirm this behavior with the gtkagg
backend. If I fall back to ipython 0.6.15, cpu usage remains normal.

Darren

···

On Wednesday 04 January 2006 13:29, Fernando Perez wrote:

[ I'm cc-ing the matplotlib list here, in case anyone can help us with this
one. The context is: testing the new ipython release candidate from

http://ipython.scipy.org/dist/testing/

Charlie is havig problems with -pylab and the gtk backend.]

Hi Charlie,

Charlie Moad wrote:
> First of all, thanks as always. I can't remember the last time I
> have used the vanilla python shell.
> I am trying the rc, and I get 100% cpu usage just by running
> ipython -pylab. This is on ubuntu/mpl-cvs/gtkagg.

This has been reported before, and I am not yet sure if the problem is
ipython or matplotlib. Unfortunately, on all of my boxes,
matplotlib/gtkagg just segfaults instantly, so I can't even debug this one.

Help me a little: can you please test back and forth ipython 0.6.15 and
0.7.0.rc, without changing anything else? Is the problem ONLY with 0.7.0?

If that is the case, then I can try to track down what the threading call
causing the problem might be. IPython has no C code in it, it only
initializes the threads system for GTK, but perhaps I'm making an incorrect
call there.

Any help here would be very welcome.

Cheers,

f

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...143...
office: (607) 255-9894
fax: (607) 255-9001

Charlie Moad wrote:

Works fine with 0.6.15, but it spins with 0.7.0. It does work with
0.7.0, but it just busy waits. 0.6.15 gives a warning:

Aha! This is very, very good. I tried 0.6.15 on my box to see if the segfault also went away, but no luck there. So we're stuck with debug-by-proxy.

I've attached the diff for the relevant file, Shell.py, between .6.15 and .7.0. It's kind of big, but the part that I think matters is only this:

- def mainloop(self):
+ def mainloop(self,sys_exit=0,banner=None):

ipshell.diff (14.4 KB)

···

+
+ self._banner = banner

- self.gtk.timeout_add(self.TIMEOUT, self.on_timer)
+ if self.gtk.pygtk_version >= (2,4,0):
+ import gobject
+ gobject.idle_add(self.on_timer)
+ else:
+ self.gtk.idle_add(self.on_timer)

See if you can revert back to the timeout_add method and if that helps.

If so, we can try to understand better what the right call to make should be.

Cheers,

f

[ moving over to the mpl list, this isn't really ipython-user material]

Fernando Perez wrote:

Charlie Moad wrote:

Works fine with 0.6.15, but it spins with 0.7.0. It does work with
0.7.0, but it just busy waits. 0.6.15 gives a warning:

Aha! This is very, very good. I tried 0.6.15 on my box to see if the segfault also went away, but no luck there. So we're stuck with debug-by-proxy.

I've attached the diff for the relevant file, Shell.py, between .6.15 and .7.0. It's kind of big, but the part that I think matters is only this:

- def mainloop(self):
+ def mainloop(self,sys_exit=0,banner=None):
+
+ self._banner = banner

- self.gtk.timeout_add(self.TIMEOUT, self.on_timer)
+ if self.gtk.pygtk_version >= (2,4,0):
+ import gobject
+ gobject.idle_add(self.on_timer)
+ else:
+ self.gtk.idle_add(self.on_timer)

See if you can revert back to the timeout_add method and if that helps.

Furthermore, keeping the warning you got in mind:

/usr/lib/python2.4/site-packages/ipython-0.6.15-py2.4.egg/IPython/Shell.py:627:
GtkDeprecationWarning: gtk.timeout_add is deprecated, use
gobject.timeout_add instead
   self.gtk.timeout_add(self.TIMEOUT, self.on_timer)

the next thing to try would be to change

> + if self.gtk.pygtk_version >= (2,4,0):
> + import gobject
> + gobject.idle_add(self.on_timer)

into

         if self.gtk.pygtk_version >= (2,4,0):
             import gobject
             gobject.timeout_add(self.TIMEOUT, self.on_timer)

that might do it.

Cheers,

f

the next thing to try would be to change

> + if self.gtk.pygtk_version >= (2,4,0):
> + import gobject
> + gobject.idle_add(self.on_timer)

into

         if self.gtk.pygtk_version >= (2,4,0):
             import gobject
             gobject.timeout_add(self.TIMEOUT, self.on_timer)

Yup, that does it.

Thanks,
     Charlie

Charlie Moad wrote:

the next thing to try would be to change

> + if self.gtk.pygtk_version >= (2,4,0):
> + import gobject
> + gobject.idle_add(self.on_timer)

into

        if self.gtk.pygtk_version >= (2,4,0):
            import gobject
            gobject.timeout_add(self.TIMEOUT, self.on_timer)

Yup, that does it.

Great, thanks for the help. Fix committed to SVN and uploaded as rc8 (along with a few other fixes I had in waiting).

If anyone on the mpl team wants to test the new ipython, downloads are here:

http://ipython.scipy.org/dist/testing/

I plan on making an official release next week, so please let me know of any problems you may encounter (matplotlib-related or not).

Cheers,

f

I updated from svn, rc8 seems to have cleared it up for me as well.

···

On Wednesday 04 January 2006 15:01, Fernando Perez wrote:

Charlie Moad wrote:
>>the next thing to try would be to change
>>
>> > + if self.gtk.pygtk_version >= (2,4,0):
>> > + import gobject
>> > + gobject.idle_add(self.on_timer)
>>
>>into
>>
>> if self.gtk.pygtk_version >= (2,4,0):
>> import gobject
>> gobject.timeout_add(self.TIMEOUT, self.on_timer)
>
> Yup, that does it.

Great, thanks for the help. Fix committed to SVN and uploaded as rc8
(along with a few other fixes I had in waiting).

If anyone on the mpl team wants to test the new ipython

Darren Dale wrote:

If anyone on the mpl team wants to test the new ipython

I updated from svn, rc8 seems to have cleared it up for me as well.

Great, thanks for the confirmation.

Please keep me posted on any problems as soon as you see them. The diff I committed was over 5000 lines in one week, so I'm a little apprehensive here about bugs lurking beneath (though I've already caught and killed quite a few).

Cheers,

f