[IPython-dev] Patch for broken debugger

Fernando Perez fperez.net@gmail....
Thu Dec 17 00:34:15 CST 2009


Hi Erik,

On Wed, Dec 16, 2009 at 6:51 PM, Erik Tollerud <erik.tollerud@gmail.com> wrote:
> I decided to try out the bzr version of ipython again and it looks
> great except for continued problems using the %debug magic ... this
> time, instead of getting nothing, I get an exception due to the debug
> handler trying to make use of the __IPYTHON__ builtin which I
> understand has been removed in .11 ... This seemed like an easy fix,
> so I went in and replaced __IPYTHON__ with a reference to the current
> shell instance (assigned in the Pdb.__init__ from ipapi.get() ).
> Problem is, apparently the debugger expects the shell to be an
> InteractiveShellEmbed, which has a set_completer_frame method.  So I
> added a method to the Pdb class that emulates the presence of
> set_completer_frame, and now all of a sudden the debugger works
> perfect. But I have no idea what unintended consequences this might
> have (and am confused why set_completer_frame is not present in the
> first place, or in InteractiveShell)...
>
> At any rate, attached is a patch that seems to work for me (made with
> bzr send).  In general, what's the best way to submit patches/fixes -
> via this list, the launchpad bug tracker, or a personal launchpad
> branch?

This is fine, thanks!  I plan on spending some time this weekend
reviewing all the work that's in Brian's latest branch so we can merge
it all, to start stabilizing the 0.11 series and  fixing all  the
little things we'll  need  to clean up.  At that  point we'll drop
your patch in as well.

For more long-term development a bzr branch makes pulling/merging
easier, but for standalone fixes this is just  fine, thanks!

Tracked here now:

https://bugs.launchpad.net/ipython/+bug/497651

Cheers,

f


More information about the IPython-dev mailing list