[IPython-user] ipython 0.7.3 vs. django (python 2.5)

Fernando Perez fperez.net@gmail....
Tue Apr 3 00:32:29 CDT 2007


On 4/2/07, Robert Kern <robert.kern@gmail.com> wrote:
> Fernando Perez wrote:

> > I can cut an RC in a day or so, so if you let me know what needs to be
> > done, I'll do it.  Yesterday I went through most of the remaining
> > issues, and now we're done to just a few.  I hope to finish clearing
> > them in the next day or two to cut a RC, so I'll be happy to do this
> > as well.  Is it just a matter of disabling ipy_stock_completers in the
> > default profile?
>
> That's probably a good idea by itself. I would recommend splitting up
> ipy_stock_completers.py with

OK, in r2200 I just completely removed the section that used
walk_packages.  I'm still on 2.4, so I hadn't seen it first-hand ever.
 I just made a clean profile and ran ipython under 2.5, and oh my god.
 That thing is all kinds of nastiness: if you have *anything* in your
path that is not 2.5 compatible at the C level you get a billion
warnings, it's very slow, and it didn't really work right either:

[... warnings...]

This Python has API version 1013, module ctraits has version 1012.
  import ctraits
/home/fperez/tmp/local/lib/python2.4/site-packages/matplotlib2/enthought/traits/trait_base.py:81:
RuntimeWarning: Python C API version mismatch for module ctraits: This
Python has API version 1013, module ctraits has version 1012.
  import ctraits
In [1]: import

[Standby while scanning modules, this can take a while]


In [1]: import

[Standby while scanning modules, this can take a while]


In [1]: import f

[Standby while scanning modules, this can take a while]


In [1]: import n

No matter what I tried, hitting TAB just gave me this message and no
completions.

So basically it's both dangerous AND broken.  Out the window.

If anyone implements a sys.path walker with sane behavior, it would be
very nice to have, but it will be post-0.7.4.  We're too close to a
release for anything but cleaning up the remaining reported problems.

> #### Comment markers ######################################################
>
> and add some docstrings to each completer to explain what they do. A little bit
> of docs to explain how to add a my_completers.py file to your configuration to
> add the ones you want would go over well, too.

Yup, that code could use a bit of love and docs.  I also don't like
the fact that just importing it has the side effect of auto-loading
all the completers, which means users can't easily import the module
and then only register the ones they want to use.

But a more significant cleanup is not what I want to get into right
now, so let's leave it at fixing the use  of that dangerous routine
for now.  Since Ville wrote that code, I'm sure when his schedule
becomes a bit more manageable he'll have some ideas on what to do
there.

Thanks for the feedback, Robert.  Because I didn't know this code in
detail, I was about to brush the problem off as a django issue.  Good
catch.

Cheers,

f


More information about the IPython-user mailing list