      is_compressed = False
  
      if compress:
          # Avoid zlib dependency unless compress is being used
          compressed = zlib.compress(data)
          if len(compressed) < (len(data) - 1):
              data = compressed
              is_compressed = True
      base64d = b64_encode(data)
      if is_compressed:
 
</s> remove     return base64.urlsafe_b64encode(s).strip('=')
 </s> add     return base64.urlsafe_b64encode(smart_bytes(s)).decode('ascii').strip('=') </s> remove     return base64.urlsafe_b64decode(s + pad)
 </s> add     return base64.urlsafe_b64decode(smart_bytes(s + pad)).decode('ascii') </s> remove from django.utils.encoding import force_text, smart_bytes
 </s> add from django.utils.encoding import smart_bytes
        compressed = zlib.compress(smart_bytes(data))
      is_compressed = False
  
      if compress:
          # Avoid zlib dependency unless compress is being used
        compressed = zlib.compress(smart_bytes(data))
          if len(compressed) < (len(data) - 1):
              data = compressed
              is_compressed = True
      base64d = b64_encode(data)
      if is_compressed:
keep keep keep keep replace keep keep keep keep keep
 [py3] Made signing infrastructure pass tests with Python 3 
django/core/signing.py