  
      def parse(self, stream, media_type=None, parser_context=None):
          try:
              tree = ET.parse(stream)
          except (ExpatError, ETParseError, ValueError), exc:
              raise ParseError('XML parse error - %s' % unicode(exc))
          data = self._xml_convert(tree.getroot())
  
          return data
  
 
</s> remove         except MultiPartParserError, exc:
 </s> add         except MultiPartParserError as exc: </s> remove         except ValueError, exc:
 </s> add         except ValueError as exc: </s> remove         except (ValueError, yaml.parser.ParserError), exc:
 </s> add         except (ValueError, yaml.parser.ParserError) as exc: </s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data) </s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data)
        except (ExpatError, ETParseError, ValueError) as exc:
  
      def parse(self, stream, media_type=None, parser_context=None):
          try:
              tree = ET.parse(stream)
        except (ExpatError, ETParseError, ValueError) as exc:
              raise ParseError('XML parse error - %s' % unicode(exc))
          data = self._xml_convert(tree.getroot())
  
          return data
  
keep keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/parsers.py