[Cython] Should we drop support for CPython 2.3? (and maybe even 2.4?)

Stefan Behnel stefan_ml at behnel.de
Sat Jul 30 10:43:19 CEST 2011

Robert Bradshaw, 29.07.2011 20:10:
> On Wed, Jul 27, 2011 at 11:32 PM, Vitja Makarov wrote:
>> It's fun: with cython you can use decorators, generators and more with py2.3,
>> may be it's better to drop support after 0.15?

I think Vitja has a point here. Cython now supports major Python language 
features that were not even remotely planned when the CPython versions it 
runs on were released.

> In general, it sounds like people are fine with dropping support for
> 2.3, and we've got one request for holding onto 2.4 a little bit
> longer (but dropping that is on the horizon too).

I just noticed that the 2.4 hg branch of CPython was closed in March, so 
it's definitely dead and gone.

Dropping support for 2.4 has a couple of advantages at the C level. 
Exceptions turned into types in 2.5 and Py_ssize_t was introduced. So, 
making 2.5 the oldest supported version would allow us to drop some legacy 
code and start enabling optimisations for that version. Not to mention that 
sets are builtins since 2.4, which would drop the need for another bunch of 
legacy code.

Other new features in 2.5:

- some extensions to distutils, the lack of which currently account for 
some of the warts in our setup.py script.

- relative imports

- with statement

- coroutines (yield as an expression)

- unified try-except-finally

All of these would have helped in more than one place to make Cython's code 
cleaner, simpler and safer.

This version also was the first one to use an AST for parsing (not sure if 
that's interesting for us), and it was the first to ship with 
ctypes/libffi, which keeps being considered as a future basis for certain 
advanced Cython features.

All of this makes me think that we should drop support for 2.4 soon, 
preferably right after 0.15 is out, and then have some fun ripping out dead 


More information about the cython-devel mailing list