[OSGeo-Discuss] OSGEO projects and Python 3.x

Howard Butler hobu.inc at gmail.com
Sun Jan 3 08:57:12 PST 2010


On Jan 3, 2010, at 10:46 AM, Dave Sampson wrote:

> Hey Folks,
> 
> I am wondering what, if any, projects are preparing or planning for a
> move to support python 3.x.
> 
> Due to it being a major release I understand it does not come with
> backwards compatibility, however there are some tools out there to help
> with this. and of course there is surely to be lots of hands on
> tweaking.
> 
> This also raises questions about projects using jython as it just
> released Jython 2.5.1 in september of 2009.
> 
> If there are projects moving towards this assume there are libraries
> that will also have to create bindings and such.
> 
> with the Public Address Geocoder project (http://www.pagcgeo.org/) I
> just created python bindings for the library. I am wondering if I should
> go ahead with python 3.x bindings. Using SWIG this should not be a
> challenge. 
> 
> so what are people doing with python 3?


While the expectation is such that people aren't requiring the usage of Python 3 that widely, and most of the distributions haven't picked it up yet, there's some support in the Open Source GIS realm.  Thanks to Even Rouault, GDAL 1.7 will have Python 3 support through SWIG, though it will be somewhat limited by numpy not being ported to Python 3.x.  libLAS also provides support for Python 3.x via ctypes.  I know that Shapely also has some Python 3 support. I am sure there are many others.

I would say that Python 3.x is not widely enough used to require *only* Python 3.  You must support both the 2.x and 3.x right now (my guess is that you'll probably want to support Python 2.x for at least the next five years as well), either within the same codebase or as two separate sub-libraries that are mostly the same code.

Howard





More information about the Discuss mailing list