backport python 2.5