[Python-3000] [Python-Dev] Need help for SWIG's Python 3.0 backend

Gregory P. Smith greg at krypto.org
Sat Apr 12 06:15:38 CEST 2008


-cc: python-dev
+cc: python-3000

Hi Haoyu,

I'm glad someone wanting to work on updating swig for python 3.x.  A better
mailing list for python 3.x internals questions as you work on this is the
python-3000 at python.org list.

The first place I suggest looking when you have a question is in the Python
trunk vs Python py3k branch source trees themselves (see
http://python.org/dev/ for instructions on how to check them out from
subversion).  Take a look at how functions were used internally in the
Python/ and Objects/ subdirectories in trunk and take another look at how
similar stuff works in the py3k branch and maybe it'll give you hints about
what to do.

It'd be ideal if swig could do its thing in the future without using any
undocumented/private APIs.

-gps

On Fri, Apr 11, 2008 at 9:35 AM, Haoyu Bai <divinekid at gmail.com> wrote:

> Hello,
>
> I am a Google Summer of Code student who preparing a SWIG's Python 3.0
> support proposal. Here's detail of my proposal:
>
> http://www.dabeaz.com/cgi-bin/wiki.pl?GSoCPython3Proposal
>
> And abstract shown below for convenient:
>
> This project adds Python 3.0 support for SWIG. We will add a "-3" option
> to SWIG's current backend, which indicates SWIG to generate wrapper for
> Python 3. We also make SWIG generate more efficient code and more clear
> proxy by utilizing Python 3's new features.
>
> The considered features are as follows:
>
>     * Function Annotations
>
>     * Mutable Buffer Support
>
>     * Abstract Base Classes
>
>
> I have read PEPs and Python 3's document, then did some experiment on
> the API. I have modified a SWIG generated wrapper code by hand so it can
>  running with Python 3.0.
>
> However, there still some API changes I can't handle. SWIG used some
> undocumented C API, for example the _PyInstance_Lookup(). And some API
> disappeared, I can't found the alternative of them, for example
> PyInstance_NewRaw().
>
> I think I will need a lot of help from Python developers if my proposal
> is accepted. So I post this here to make sure if I can get help when
> doing this project. And I really appreciate if you can give any advice
> about how to solve the problems I mentioned before.
>
> Thank you!
>
>
> Best regards,
>
> Haoyu Bai
> 4/12/2008
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/greg%40krypto.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20080411/d807b79e/attachment.htm 


More information about the Python-3000 mailing list