[IPython-user] 0.4.0 ready for Monday
Fernando Perez
fperez at colorado.edu
Mon May 19 16:27:06 CDT 2003
Prabhu Ramachandran wrote:
>>>>>>"FP" == Fernando Perez <fperez at colorado.edu> writes:
>
>
> FP> Hi all, I think 0.4.0 is ready for release, so I'll put it out
> FP> on Monday barring any last-minute show-stoppers. It's
> FP> basically 0.2.15pre4 with a few small things, and two
> FP> important fixes:
>
> Last evening my advisor pointed to me a problem with IPython and a
> SWIG wrapped module. Global variables in C are wrapped by swig and
> put in an object called cvar that behaves in what might be considered
> un-pythonic fashion. Here is an example of what happens:
Ok, on second thought, I did add some hardening here. While I maintain that
this is a SWIG bug, I don't expect people to upgrade SWIG just because of
this, and the SWIG authors may disagree and keep their current implementation.
Since I try to make ipython as user-friendly as possible, I wrapped the call
to inspect.getdoc() into a fully open try/except: block with no exception
specified. This will trap _any_ failure mode in getdoc() silently:
try:
# Harden against an inspect failure, which can occur with
# SWIG-wrapped extensions. These can easily crash
# inspect.
ds = inspect.getdoc(self.tmp_obj)
except:
ds = None
This will go into 0.4 when it goes out.
I still think you should discuss this with the swig crowd, as I think they are
in the wrong. But it doesn't cost me much to make life easier for ipython
users :)
Cheers,
f.
More information about the IPython-user
mailing list