  Provides a set of pluggable authentication policies.
  """
  
  from django.contrib.auth import authenticate
  from django.utils.encoding import smart_unicode, DjangoUnicodeDecodeError
  from rest_framework import exceptions
  from rest_framework.compat import CsrfViewMiddleware
  from rest_framework.authtoken.models import Token
  import base64
  
 
</s> remove from StringIO import StringIO
 </s> add from rest_framework.compat import StringIO </s> remove from django.utils.encoding import is_protected_type, smart_unicode
 </s> add from django.utils.encoding import is_protected_type
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text </s> remove from django.utils.encoding import smart_unicode
 </s> add try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text </s> remove import StringIO
 </s> add from rest_framework.compat import StringIO
 </s> remove from django.utils.encoding import force_unicode
 </s> add try:
    from django.utils.encoding import force_text
except ImportError:
    from django.utils.encoding import force_unicode as force_text
from django.utils.encoding import DjangoUnicodeDecodeError
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text
  Provides a set of pluggable authentication policies.
  """
  
  from django.contrib.auth import authenticate
from django.utils.encoding import DjangoUnicodeDecodeError
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text
  from rest_framework import exceptions
  from rest_framework.compat import CsrfViewMiddleware
  from rest_framework.authtoken.models import Token
  import base64
  
keep keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/authentication.py