  
  try:
      from django.utils.encoding import smart_text
  except ImportError:
      from django.utils.encoding import smart_unicode as smart_text
  
  from django.utils.xmlutils import SimplerXMLGenerator
 
</s>
import six

  
import six

  try:
      from django.utils.encoding import smart_text
  except ImportError:
      from django.utils.encoding import smart_unicode as smart_text
  
  from django.utils.xmlutils import SimplerXMLGenerator
add keep keep keep keep keep keep
 Every (base) test should now pass with python3.
rest_framework/utils/__init__.py