@@ 2,10 2,10 @@ import urllib2
import feedparser
from urllib import urlencode
from datetime import datetime, timedelta
+from hashlib import sha1
from django.db import models
from django.conf import settings
-from django.utils.hashcompat import sha_constructor
from django.core.urlresolvers import reverse, NoReverseMatch
from djpubsubhubbub import signals
@@ 144,7 144,7 @@ class Subscription(models.Model):
def generate_token(self, mode, run_save=True):
assert self.pk is not None, \
'Subscription must be saved before generating token'
- token = mode[:20] + sha_constructor('%s%i%s' % (
+ token = mode[:20] + sha1('%s%i%s' % (
settings.SECRET_KEY, self.pk, mode)).hexdigest()
self.verify_token = token
if run_save: