IPython - Enhanced Interactive Python

%debug broken in 0.11 series

Reported by Fernando Perez on 2009-12-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Fernando Perez

Bug Description

From Erik Tollerud, on-list:

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?

Fernando Perez (fdo.perez) wrote :
Changed in ipython:
status: New → In Progress
assignee: nobody → Fernando Perez (fdo.perez)
milestone: none → 0.11

This is already fixed in my branch.

On Wed, Dec 16, 2009 at 10:33 PM, Fernando Perez <email address hidden> wrote:
>
> ** Attachment added: "Erik's patch"
>   http://launchpadlibrarian.net/36895432/debugger.diff
>
> ** Changed in: ipython
>       Status: New => In Progress
>
> ** Changed in: ipython
>     Assignee: (unassigned) => Fernando Perez (fdo.perez)
>
> ** Changed in: ipython
>    Milestone: None => 0.11
>
> --
> %debug broken in 0.11 series
> https://bugs.launchpad.net/bugs/497651
> You received this bug notification because you are a member of IPython
> Developers, which is subscribed to IPython.
>
> Status in IPython - Enhanced Interactive Python: In Progress
>
> Bug description:
> >From Erik Tollerud, on-list:
>
> 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?
>
>
>

--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
<email address hidden>
<email address hidden>

Fernando Perez (fdo.perez) wrote :

On Wed, Dec 16, 2009 at 10:56 PM, Brian Granger <email address hidden> wrote:
> This is already fixed in my branch.
>

Ah, great! I didn't know that, I just wanted to make sure Erik's
contribution didn't go to waste.

All the more reason for me to pound on that code this weekend :)

Thanks!

f

eteq (erik-tollerud) wrote :

Ah so it is - I thought this bug was seperate from the earlier debug bug Brian had fixed, as it didn't previously raise an exception...

Brian Granger (ellisonbg) wrote :

We will double check to make sure, but I think this one was fixed.

Brian

On Thu, Dec 17, 2009 at 11:04 AM, eteq <email address hidden> wrote:
> Ah so it is - I thought this bug was seperate from the earlier debug bug
> Brian had fixed, as it didn't previously raise an exception...
>
> --
> %debug broken in 0.11 series
> https://bugs.launchpad.net/bugs/497651
> You received this bug notification because you are a member of IPython
> Developers, which is subscribed to IPython.
>
> Status in IPython - Enhanced Interactive Python: In Progress
>
> Bug description:
> >From Erik Tollerud, on-list:
>
> 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?
>
>
>

--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
<email address hidden>
<email address hidden>

Fernando Perez (fdo.perez) wrote :

Closing the bug, this one is indeed now fixed in trunk.

Changed in ipython:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers