  
  from django.core.exceptions import PermissionDenied
  from django.http import Http404
  from django.views.decorators.csrf import csrf_exempt
  from rest_framework import status, exceptions
  from rest_framework.compat import HttpResponseBase, View
  from rest_framework.request import Request
  from rest_framework.response import Response
  from rest_framework.settings import api_settings
 
</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 force_text, OrderedDict
 </s> add from rest_framework.compat import OrderedDict </s> remove from rest_framework.compat import BytesIO
 </s> add 
from django.utils.encoding import smart_text
  
  from django.core.exceptions import PermissionDenied
  from django.http import Http404
from django.utils.encoding import smart_text
  from django.views.decorators.csrf import csrf_exempt
  from rest_framework import status, exceptions
  from rest_framework.compat import HttpResponseBase, View
  from rest_framework.request import Request
  from rest_framework.response import Response
  from rest_framework.settings import api_settings
keep keep add keep keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/views.py