  from __future__ import unicode_literals
  from django.db.models.query import QuerySet
  from django.utils import six, timezone
  from django.utils.functional import Promise
  from rest_framework.compat import force_text, OrderedDict
  import datetime
  import decimal
  import types
  import json
  
 
</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 from rest_framework.compat import force_text, OrderedDict
 </s> add from rest_framework.compat import OrderedDict </s> remove from django.utils.encoding import is_protected_type
 </s> add from django.utils.encoding import is_protected_type, smart_text
from rest_framework.compat import OrderedDict
  from __future__ import unicode_literals
  from django.db.models.query import QuerySet
  from django.utils import six, timezone
  from django.utils.functional import Promise
from rest_framework.compat import OrderedDict
  import datetime
  import decimal
  import types
  import json
  
keep keep keep keep replace keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/utils/encoders.py