  from rest_framework.compat import smart_text, urlparse
  from rest_framework.fields import get_attribute, empty, Field
  from rest_framework.reverse import reverse
  from rest_framework.utils import html
  from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
  from django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch, Resolver404
 
</s> remove from rest_framework.compat import smart_text, HttpResponseBase, View
 </s> add from rest_framework.compat import HttpResponseBase, View </s> remove from rest_framework.compat import (
    SHORT_SEPARATORS, LONG_SEPARATORS, StringIO, smart_text, yaml
)
 </s> add from rest_framework.compat import SHORT_SEPARATORS, LONG_SEPARATORS, yaml </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 </s> remove     smart_text, EmailValidator, MinValueValidator, MaxValueValidator,
 </s> add     EmailValidator, MinValueValidator, MaxValueValidator,
from django.utils.encoding import smart_text
from rest_framework.compat import urlparse
from django.utils.encoding import smart_text
from rest_framework.compat import urlparse
  from rest_framework.fields import get_attribute, empty, Field
  from rest_framework.reverse import reverse
  from rest_framework.utils import html
  from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
  from django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch, Resolver404
replace keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/relations.py