If you want to keep the compatibility with Django 1.2 these lines are still needed,
but the changes made only affects the Python version < 2.5.

Note that the call to django.utils.hashcompat will be removed in Django 1.6