[IPython-dev] Status of py3k ipython
Mon Oct 4 07:14:26 CDT 2010
On 4 October 2010 05:26, MinRK <email@example.com> wrote:
> Thanks for figuring this out, but there are a couple issues. We actually
> need the buffer code to work on *both* Python 2 and 3, so commenting things
> out doesn't work. It does help find the real issues elsewhere, though.
> That file, as it started in mpi4py, works on Pythons 2.3-3.2, but I have
> clearly broken some of them when I made my adjustments bringing it into
> pyzmq. I will work these issues out.
I quite agree, but never having touched Cython code before, I wanted to get
it working before trying to resolve compatibility.
Where Cython is converting python functions to C code, it will create
preprocessor if/else sections where Python 2 and Python 3 API code needs to
be different. However, if we cimport API functions (PyString... etc.), it
will try to link those, whichever environment it is compiled in.
> As for the PyUnicode instead of PyString: We actually want to enforce
> PyBytes in Python 3, not PyUnicode. It's critically important that pyzmq
> never has to deal with Python Unicode objects except through _unicode
> convenience methods, due to heinous memory performance issues I won't get
> into here (but have gotten into plenty with Brian and Fernando).
OK, I'll get onto that this evening. In fact, if we use PyBytes, it looks
like we can make a version that works for 2.6 and 3.x, although I think that
wouldn't work for anything before 2.6.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev