These changes are cherry-picked from britney1 (7e94274 and f50c039).
Commit messages follow.
7e94274: Use python 2.5.
f50c039: use PyObject_DEL() for memory allocated with PyObject_NEW().
See http://www.python.org/doc/2.5.4/whatsnew/ports.html (section about
"obmalloc"): Python 2.5 is no longer lenient about code that mixes NEW/DEL
from different memory families of functions.