      except ImportError:
          pass
  
  
  # cStringIO only if it's available, otherwise StringIO
  try:
      import cStringIO.StringIO as StringIO
  except ImportError:
      StringIO = six.StringIO
  
  BytesIO = six.BytesIO
  
  
  # urlparse compat import (Required because it changed in python 3.x)
  try:
      from urllib import parse as urlparse
  except ImportError:
      import urlparse
 
</s> remove # Handle django.utils.encoding rename in 1.5 onwards.
# smart_unicode -> smart_text
# force_unicode -> force_text
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text
try:
    from django.utils.encoding import force_text
except ImportError:
    from django.utils.encoding import force_unicode as force_text


 </s> add  </s> remove except:
 </s> add except ImportError: </s> remove def get_concrete_model(model_cls):
    try:
        return model_cls._meta.concrete_model
    except AttributeError:
        # 1.3 does not include concrete model
        return model_cls


 </s> add  </s> remove from rest_framework.compat import urlparse, force_text
 </s> add from rest_framework.compat import urlparse </s> remove from rest_framework.compat import etree, yaml, force_text, urlparse
 </s> add from django.utils.encoding import force_text
from rest_framework.compat import etree, yaml, urlparse
      except ImportError:
          pass
  
  









  # urlparse compat import (Required because it changed in python 3.x)
  try:
      from urllib import parse as urlparse
  except ImportError:
      import urlparse
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/compat.py