Switching from Pyrex to Cython

John Arbash Meinel john at arbash-meinel.com
Wed Jul 15 03:39:03 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> 2009/7/15 John Arbash Meinel <john at arbash-meinel.com>:
> 
>> Anyway, I'd *really* like to at least upgrade to a version of pyrex that
>> supports
>>  cdef list myobject
>> and
>>  myval += 1
>>
>> And if we are going to do that, we should consider upgrading to Cython
>> anyway.
> 
> It depends what you mean by "upgrading".  It seems like some of these
> benefits, like better tracebacks, you'll get by just using the newer
> compiler in building the packages or in your own development
> environment, but the larger ones depend on us stating a requirement
> for that version and making use of it in our source.
> 
> Is Cython upwardly-compatible with all our Pyrex source?
> 
> We can get a later version installed on the pqm machine.  It will be
> much easier if it's at least packaged in Karmic and can be rebuilt to
> work with python2.4 installed there.  It's hard to predict how long it
> will take, but if we want it we should send the request now...
> 

Right. So it is a change to what our "minimum acceptable version"
version of Pyrex is. Last I new, PQM used pyrex 0.9.4, so we guaranteed
backwards compatibility of the source code to that version.

0.9.8.5 (or cython) would allow us to start using syntax like:
  cdef list foo

Which would no longer be compatible with 0.9.4.

The new syntax is nicer enough that I feel it is worthwhile. Especially
since we ship the .c files in the release tarballs.

If we start versioning the .c files

1) It matters even less for people who don't have pyrex/cython, as they
will just use whatever version we supply them.
2) It matters a bit more for people who might be developing, as 'touch
foo.pyx; make' will suddenly cause their .c file to potentially change
dramatically.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpdQUUACgkQJdeBCYSNAAOP6wCgvdBwqumwOTg9yThmdlAA5GnD
7ssAnRefi5mt8lNZafyZG+MgytZkjVv/
=/MhP
-----END PGP SIGNATURE-----



More information about the bazaar mailing list