]> granicus.if.org Git - python/commitdiff
Issue #16986: ElementTree now correctly parses a string input not only when
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 22 May 2013 14:21:06 +0000 (17:21 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 22 May 2013 14:21:06 +0000 (17:21 +0300)
an internal XML encoding is UTF-8 or US-ASCII.

1  2 
Lib/test/test_xml_etree.py
Misc/NEWS
Modules/_elementtree.c

Simple merge
diff --cc Misc/NEWS
index 8bd5e0b50fe1c300ccb934dba354050f3b4921e0,15c6c9eca5ccb1541f8112e744af81d0f3a7991b..d56987dfe2a646d9a0b6d43e59d65e7b4bd02ad4
+++ b/Misc/NEWS
@@@ -96,35 -106,6 +96,38 @@@ Core and Builtin
  Library
  -------
  
++- Issue #16986: ElementTree now correctly parses a string input not only when
++  an internal XML encoding is UTF-8 or US-ASCII.
++
 +- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX.
 +
 +- Issue #17900: Allowed pickling of recursive OrderedDicts.  Decreased pickled
 +  size and pickling time.
 +
 +- Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
 +  initial patch by Trent Nelson.
 +
 +- Issue #17812: Fixed quadratic complexity of base64.b32encode().
 +  Optimize base64.b32encode() and base64.b32decode() (speed up to 3x).
 +
 +- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of
 +  service using certificates with many wildcards (CVE-2013-2099).
 +
 +- Issue #15758: Fix FileIO.readall() so it no longer has O(n**2) complexity.
 +
 +- Issue #14596: The struct.Struct() objects now use more compact implementation.
 +
 +- Issue #17981: Closed socket on error in SysLogHandler.
 +
 +- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
 +  is long, not int.
 +
 +- Fix typos in the multiprocessing module.
 +
 +- Issue #17754: Make ctypes.util.find_library() independent of the locale.
 +
 +- Issue #17968: Fix memory leak in os.listxattr().
 +
  - Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
    characters() and ignorableWhitespace() methods.  Original patch by Sebastian
    Ortiz Vasquez.
index c53f5ee219ef6ae98b0274ea6822919b0c22ce29,5078b8372f838e7f398d8e9ef5f5acfa35b5b585..0d86886579b70bb165b11d75bc0c117c0a20e2b2
@@@ -3523,9 -3584,16 +3544,9 @@@ xmlparser_setevents(XMLParserObject *se
  }
  
  static PyMethodDef xmlparser_methods[] = {
-     {"feed", (PyCFunction) xmlparser_feed, METH_VARARGS},
+     {"feed", (PyCFunction) xmlparser_feed, METH_O},
      {"close", (PyCFunction) xmlparser_close, METH_VARARGS},
 -    {"_parse", (PyCFunction) xmlparser_parse, METH_VARARGS},
 +    {"_parse_whole", (PyCFunction) xmlparser_parse_whole, METH_VARARGS},
      {"_setevents", (PyCFunction) xmlparser_setevents, METH_VARARGS},
      {"doctype", (PyCFunction) xmlparser_doctype, METH_VARARGS},
      {NULL, NULL}