[IPython-dev] IPython with Py3k

Fernando Perez fperez.net at gmail.com
Tue Sep 14 20:04:57 EDT 2010

On Tue, Sep 14, 2010 at 4:37 PM, Thomas Kluyver <takowl at gmail.com> wrote:
> ipy3-preparation, my Python 2 branch tracking newkernel, now passes all nine
> test suites, at least on my machine (tested at this commit*). Feel free to
> review the changes in this with an eye to merging them into newkernel. It is
> not intended to be compatible with Python 3, but it makes conversion
> simpler, partly by cutting compatibility with older Python 2.x versions.

Fantastic, many thanks!!! We're 'landing' newkernel right now, so we
may wait until you return from holiday (just not enough time to do
both), but this is very, very much appreciated.  Today numpy moved to
github, we're inching closer to py3 support for ipython, the newkernel
stuff is going great.  MMh, too many good news together, I should
watch for pianos falling from windows on my way home :)

> ipy3-newkernel (my Python 3 branch, tracking ipy3-preparation but via the
> 2to3 converter) is still some way from passing its test suites, although it
> works well enough to be useful to me. I'll continue to work on it, although
> it'll have a brief pause when I go on holiday in a couple of days. If you
> want to investigate, it's at:
> http://github.com/takowl/ipython/tree/ipy3-newkernel
> One specific question (and the cause of a remaining failure in the
> IPython.lib tests): if you enter a line with invalid syntax, Python displays
> the line back to you, with a little ^ below pointing to the problem. IPython
> gives that some pretty formatting. In ipy3-newkernel, I'm not getting that
> display, although I still get the SyntaxError: ... line. Can anyone suggest
> where I should start looking for the code for that? I think it's different
> from the code for a full traceback in core/ultratb.py .

That is handled by showsyntaxerror, line 1506 in
core.interactiveshell.  This calls a special exception handler that
was constructed in line 1338:

        # Syntax error handler.
        self.SyntaxTB = ultratb.SyntaxTB(color_scheme='NoColor')

Let me know if you need more detials...



More information about the IPython-dev mailing list