      if hasattr(random, 'SystemRandom'):
          randrange = random.SystemRandom().randrange
      else:
          randrange = random.randrange
      _MAX_CSRF_KEY = 18446744073709551616L     # 2 << 63
  
      REASON_NO_REFERER = "Referer checking failed - no Referer."
      REASON_BAD_REFERER = "Referer checking failed - %s does not match %s."
      REASON_NO_CSRF_COOKIE = "CSRF cookie not set."
      REASON_BAD_TOKEN = "CSRF token missing or incorrect."
 
</s> remove     words = word_split_re.split(force_unicode(text))
 </s> add     words = word_split_re.split(force_text(text)) </s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data) </s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data) </s> remove     #     data = {'id': 1, 'name': u'target-1', 'sources': [1]}
 </s> add     #     data = {'id': 1, 'name': 'target-1', 'sources': [1]} </s> remove         auth = 'Basic %s' % base64.encodestring('%s:%s' % (self.username, self.password)).strip()
 </s> add         auth = b'Basic ' + base64.encodestring(('%s:%s' % (self.username, self.password)).encode('utf8')).strip()
    _MAX_CSRF_KEY = 18446744073709551616      # 2 << 63
      if hasattr(random, 'SystemRandom'):
          randrange = random.SystemRandom().randrange
      else:
          randrange = random.randrange
    _MAX_CSRF_KEY = 18446744073709551616      # 2 << 63
  
      REASON_NO_REFERER = "Referer checking failed - no Referer."
      REASON_BAD_REFERER = "Referer checking failed - %s does not match %s."
      REASON_NO_CSRF_COOKIE = "CSRF cookie not set."
      REASON_BAD_TOKEN = "CSRF token missing or incorrect."
keep keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/compat.py