[IPython-dev] [Fwd: [afayolle at debian.org: Bug#374625: python2.3-ipython: help built-in function does not work]]

Fernando Perez Fernando.Perez at colorado.edu
Wed Aug 9 02:18:56 CDT 2006


Hi all,

attached is a bug report from the Debian maintainer, which I can confirm. 
Here's my take on this one, after trying a little to fix it and failing.  The 
bug is particularly strange in that the entire traceback generated only 
pertains to code in the python library, NOT to any ipython code.  So, somehow, 
we're getting inspect.py in trouble by our use of FakeModule (which is a hack, 
but a necessary one for other reasons).

Additionally, the bug only manifests itself once, as far as I can see:

import sample
help(sample) --> Big error traceback
help(sample) --> All OK

I've had over the years, no end of trouble with the inspect module in 
python2.3, it's buggy as all hell.  But since we won't get py23 fixed, perhaps 
we can find a solution in the meantime.  I see a few options:

1. Since the problem happens (as far as I can see) only once, we can hack 
things.  Instead of having help() be site._Helper(), we make it a light 
wrapper which discards first-invocation exceptions (with a warning).  This is 
very, very inelegant, but can be done in a few minutes and will be isolated to 
python 2.3.  The patch would be small, and hence easy to apply for the ipython 
maintainers, who won't be moving to our current SVN wholesale.

2. We dig deep enough to understand the real problem and find a cleaner 
workaround.  It's not impossible that in this case inspect.py is not the 
problem but our own code.


2 is obviously the better solution, but requires more time and effort.  If 
anyone thinks they can have a go at it, let me know.  Otherwise, I'd like to 
hear from the maintainers if 1 is OK with them, case in which I'll gladly code 
up a patch.

Cheers,

f

-------- Original Message --------
Subject: [afayolle at debian.org: Bug#374625: python2.3-ipython: help built-in 
function does not work]
Date: Sun, 6 Aug 2006 01:54:46 +0200
From: Norbert Tretkowski <norbert at tretkowski.de>
To: fperez at colorado.edu

Hi Fernando,

could you please take a look at the attached bugreport? I'm able to
reproduce the problem with python 2.3, but not with python 2.4.

                 Norbert

-------------- next part --------------
An embedded message was scrubbed...
From: Alexandre Fayolle <afayolle at debian.org>
Subject: Bug#374625: python2.3-ipython: help built-in function does not work
Date: Tue, 20 Jun 2006 12:12:48 +0200
Size: 9363
Url: http://projects.scipy.org/pipermail/ipython-dev/attachments/20060809/3d36d58c/attachment.eml 


More information about the IPython-dev mailing list