[SciPy-dev] Porting SciPy to Py3k GSOC project

David Cournapeau david@ar.media.kyoto-u.ac...
Tue Mar 24 01:31:53 CDT 2009


Charles R Harris wrote:
>
>
> 2009/3/23 ross smith <rjsm@umich.edu <mailto:rjsm@umich.edu>>
>
>     Hello again,
>
>
>         I don't know if my second email made it through the moderator
>         (it was too large).
>
>         2009/3/23 Charles R Harris <charlesr.harris@gmail.com
>         <mailto:charlesr.harris@gmail.com>>
>
>             Hi Ross,
>
>             2009/3/22 ross smith <rjsm@umich.edu <mailto:rjsm@umich.edu>>
>
>                 Hello everyone,
>
>                 I am interested in porting SciPy/NumPy to Py3k.  I've
>                 been working this past school year to port an existing
>                 code base to py3k for a research group on campus.  A
>                 lot of the code relies on SciPy and NumPy but the
>                 scope of my project didn't let me work on porting
>                 either project, to my dismay.  I'd love the
>                 opportunity to port a project I use heavily in my own
>                 code and gain a better understanding of how it works. 
>
>                 We are supposed to contact the group we would be
>                 working with, to flesh out the details of our
>                 application.  I've looked at the application and the
>                 only thing I know I'll need significant help with is
>                 the Milestones portion.  Of course,  Any and all
>                 suggestions are welcome!
>
>
>             Do you have a plan of attack?
>
>
>           I do.   I've done some looking through the trunk svn, and I
>         see three chunks to the project.  the Distutils, NumPy and
>         SciPy.  Distutils would be first on the list to be ported as
>         the other two won't install without it.  for the most part I
>         plan to stick to the outline in python's suggested porting
>         method as it worked well for the Lab's codebase.  
>         (http://docs.python.org/3.0/whatsnew/3.0.html)
>

You would need to port numpy itself before starting scipy as well. I
think it is fair to say that most work will be inside numpy/core - which
is ~ 30 000 LOC according to sloccount (wo counting comments, empty
lines and the like); IOW, it is massive, and there is no chance to do
the conversion in a couple of months unless you are very familiar with
numpy. I am not sure I can see a meaningful subpart of numpy/core which
could be ported for python 3 for a SoC.

A more limited in scope project would be to port f2py to python 3. It is
only python code, it is a non trivial piece of code, and required for
scipy as well (although of course f2py could be run from python 2, but
that would require some changes in numpy.distutils, as f2py is imported
as a python module for the moment).

Another angle would be to rewrite some C numpy code into cython. I don't
know enough about cython to assess whether this is a good idea or even
feasible at all, but it is my understanding that cython can generate 2.
and 3.-compatible C code. It would be helpful for numpy's
maintainability and would help for the port to python 3 as well.

cheers,

David


More information about the Scipy-dev mailing list