  from django.http import QueryDict
  from django.http.multipartparser import parse_header
  from django.utils.datastructures import MultiValueDict
  from django.utils.datastructures import MergeDict as DjangoMergeDict
  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import exceptions
  from rest_framework.settings import api_settings
  import warnings
  
 
</s> remove from rest_framework.compat import BytesIO
 </s> add  </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 smart_text, HttpResponseBase, View
 </s> add from rest_framework.compat import HttpResponseBase, View
from django.utils.six import BytesIO
  from django.http import QueryDict
  from django.http.multipartparser import parse_header
  from django.utils.datastructures import MultiValueDict
  from django.utils.datastructures import MergeDict as DjangoMergeDict
from django.utils.six import BytesIO
  from rest_framework import HTTP_HEADER_ENCODING
  from rest_framework import exceptions
  from rest_framework.settings import api_settings
  import warnings
  
keep keep keep add keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/request.py