IMPORTANT 2.5 API changes for C Extension Modules

nnorwitz at gmail.com nnorwitz at gmail.com
Wed Apr 5 02:44:16 EDT 2006


If you don't write or otherwise maintain Python Extension Modules
written in C (or C++), you can stop reading.

Python 2.5 alpha 1 is in the process of being released later today.
There are important changes that are in 2.5 to support 64-bit systems.
These changes can cause Python to crash if your module is not upgraded
to support the changes.  Python was changed internally to use 64-bit
values on 64-bit machines for indices.  If you've got a machine with
more than 16 GB of RAM, it would be great if you can test Python with
large (> 2GB) strings and other sequences.

For more details about the Python 2.5 schedule:
http://www.python.org/dev/peps/pep-0356/
For more details about the 64-bit change:
http://www.python.org/dev/peps/pep-0353/
How to fix your module:
http://www.python.org/dev/peps/pep-0353/#conversion-guidelines

The effbot wrote a program to check your code and find potential
problems.
http://svn.effbot.python-hosting.com/stuff/sandbox/python/ssizecheck.py

Please test and upgrade your extension modules!

Cheers,
n




More information about the Python-list mailing list