  from django.conf import settings
  from django.core.exceptions import ImproperlyConfigured
  from django.utils import baseconv
  from django.utils.crypto import constant_time_compare, salted_hmac
  from django.utils.encoding import force_text, smart_bytes
  from django.utils.importlib import import_module
  
  
  class BadSignature(Exception):
      """
 
</s> remove         compressed = zlib.compress(data)
 </s> add         compressed = zlib.compress(smart_bytes(data)) </s> remove     return base64.urlsafe_b64decode(s + pad)
 </s> add     return base64.urlsafe_b64decode(smart_bytes(s + pad)).decode('ascii') </s> remove     return base64.urlsafe_b64encode(s).strip('=')
 </s> add     return base64.urlsafe_b64encode(smart_bytes(s)).decode('ascii').strip('=')
from django.utils.encoding import smart_bytes
  from django.conf import settings
  from django.core.exceptions import ImproperlyConfigured
  from django.utils import baseconv
  from django.utils.crypto import constant_time_compare, salted_hmac
from django.utils.encoding import smart_bytes
  from django.utils.importlib import import_module
  
  
  class BadSignature(Exception):
      """
keep keep keep keep replace keep keep keep keep keep
 [py3] Made signing infrastructure pass tests with Python 3 
django/core/signing.py