  
  
  def b64_decode(s):
      pad = '=' * (-len(s) % 4)
      return base64.urlsafe_b64decode(s + pad)
  
  
  def base64_hmac(salt, value, key):
      return b64_encode(salted_hmac(salt, value, key).digest())
  
 
</s> remove     return base64.urlsafe_b64encode(s).strip('=')
 </s> add     return base64.urlsafe_b64encode(smart_bytes(s)).decode('ascii').strip('=') </s> remove         compressed = zlib.compress(data)
 </s> add         compressed = zlib.compress(smart_bytes(data)) </s> remove from django.utils.encoding import force_text, smart_bytes
 </s> add from django.utils.encoding import smart_bytes
    return base64.urlsafe_b64decode(smart_bytes(s + pad)).decode('ascii')
  
  
  def b64_decode(s):
      pad = '=' * (-len(s) % 4)
    return base64.urlsafe_b64decode(smart_bytes(s + pad)).decode('ascii')
  
  
  def base64_hmac(salt, value, key):
      return b64_encode(salted_hmac(salt, value, key).digest())
  
keep keep keep keep replace keep keep keep keep keep
 [py3] Made signing infrastructure pass tests with Python 3 
django/core/signing.py