  from django.http.multipartparser import MultiPartParserError
  from rest_framework.compat import yaml, ETParseError, ET_XMLParser
  from rest_framework.exceptions import ParseError
  from rest_framework.compat import six
  from xml.etree import ElementTree as ET
  from xml.parsers.expat import ExpatError
  import json
  import datetime
  import decimal
  
  
 
</s> remove from rest_framework.compat import yaml, ETParseError, ET_XMLParser
 </s> add from rest_framework.compat import yaml, etree </s> remove from decimal import Decimal
 </s> add import pickle
import re </s> remove from rest_framework.compat import yaml, patterns, url, include
 </s> add from rest_framework.compat import yaml, etree, patterns, url, include </s> remove 
 </s> add from django.utils import unittest
  from django.http.multipartparser import MultiPartParserError
  from rest_framework.compat import yaml, ETParseError, ET_XMLParser
  from rest_framework.exceptions import ParseError
  from rest_framework.compat import six


  import json
  import datetime
  import decimal
  
  
keep keep keep keep replace replace keep keep keep keep keep
 defusedxml for security fix.

As per:
http://blog.python.org/2013/02/announcing-defusedxml-fixes-for-xml.html 
rest_framework/parsers.py