[pygtk] Python 3.0 plans

Johan Dahlin johan at gnome.org
Wed Aug 29 23:37:56 WST 2007


I'd like to ask for input on how the Python 3.0 transition is going to 
affect GNOME.

Python 3.0 is the current development focus of the Python community.
It is different from the old 2.x series in the sense that it will not be 
backwards compatible with the old python releases. A program written for 
Python 2.x will not run under Python 3.x unless it restricts itself to a 
tiny tiny subset which is really not practical (for instance, unicode can't 
be used).

The first alpha release of Python 3.0 is going to be released in the next 
couple of weeks, this is a good opportunity to discuss this before the
transition actually starts. 3.0 is scheduled for release in August 2008.

All the python bindings needs to be ported over to the new C Python API.
We'd like to take this opportunity to clean up a bit of the cruft we 
collected during the years of strict backwards compatibility.
For instance it's not possible to significantly optimize the loading
of the gtk+ bindings without breaking the API, both OLPC and Nokia has been 
running into this problem.

What I'd like to  propose is a to branch of pygobject and pygtk to a 
python-3 branch where backwards compatibly can be broken.
Transition will be done by a tool similar to 2to3.py[1] used by Python which
will help automate the process of converting a program using the old api to
the new.

When this branch is mature enough I'll propose it for inclusion in the GNOME 
  bindings release, which will be an addition, not a replacement for the old 

The current version of the python bindings will be maintained as long as 
there is interest in the Python 2.x platform. But maintenance will 
eventually cease as the general focus moves over to Python 3.x.

Parallel installability is not a direct issue for us, since it's already 
solved at the python level. The current bindings will not compile under
3.x and the new ones will not compile under 2.x.



[1]: http://svn.python.org/view/sandbox/trunk/2to3/

More information about the pygtk mailing list