merge upstream ElementTree 1.3 and cElementTree 1.0.6 in /python/trunk/ - Code Review (original) (raw)

Can't Edit Can't Publish+Mail Start Review Created: 15 years, 3 months ago by flox Modified: 15 years, 1 month ago Reviewers: effbot, flox, Antoine Pitrou Base URL: http://svn.python.org/view/\*checkout\*/python/trunk/ Visibility: Public. Description Merge upstream ElementTree/cElementTree in trunk. * upstream: http://bitbucket.org/effbot/et-2009-provolone/ * branch to prepare 1.3 for Python: http://bitbucket.org/flox/et-2009-provolone/ See the thread of the request: http://bugs.python.org/issue6472 The goals of this patch are: - to fix many bugs reported in Python issue tracker - to ensure consistency between C and Python implementations (with tests) - to improve test coverage Some parts are removed because they are experimental or too much specialized: - module ElementC14N: canonical XML - ElementTree C API This patch fixes many issues, including: #6472 Update ET with upstream changes (and #1143 #1777) #1538691 Patch cET to export CurrentLineNumber #1602189 Suggest a textlist() method for ElementTree #3151 ET serialization bug for weird namespace urls #3475 _elementtree.c import can fail silently #6230 ET.Element and cET.Element have slightly different repr #6232 Improve test coverage of ET and cET #6265 cET & ET use different exceptions for XML Errors #6266 cET.iterparse & ET.iterparse return differently encoded strings #6565 improper use of __setitem__ in ET Test coverage: * relevant tests from upstream are ported to "test_xml_etree.py" * same test_suite is run for both C and Python implementations * merge tests provided with #2746, #6232 and #6233 Patch Set 1 : Patch for 2.7, with documentation and tests.# Total comments: 24 Patch Set 2 : First iteration, and document the deprecation of XMLParser.doctype(...)# Patch Set 3 : Merge *all* tests from upstream. Fix refleaks on ParseError and E.attrib.# Total comments: 7 Patch Set 4 : Add tests for the C API. Drop unused "element_(get|set)slice".# Total comments: 15 Patch Set 5 : Extend test coverage with #6232. Fix regression in E.findtext...# Patch Set 6 : Split out experimental C API.# Patch Set 7 : Rebase the patch on the Mercurial repository.# Total comments: 19 Patch Set 8 : Ready for merge in trunk?# Unified diffs Side-by-side diffs Delta from patch set Stats (+3299 lines, -1186 lines) Patch Doc/library/xml.etree.elementtree.rst View 1 2 3 4 5 6 7 15 chunks +197 lines, -127 lines 0 comments Download Lib/test/samples/simple.xml View 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download Lib/test/samples/simple-ns.xml View 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download Lib/test/test_xml_etree.py View 1 2 3 4 5 6 7 13 chunks +1525 lines, -52 lines 0 comments Download Lib/test/test_xml_etree_c.py View 1 2 3 4 5 6 7 2 chunks +15 lines, -204 lines 0 comments Download Lib/xml/etree/ElementInclude.py View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download Lib/xml/etree/ElementPath.py View 1 2 3 4 5 6 7 5 chunks +234 lines, -129 lines 0 comments Download Lib/xml/etree/ElementTree.py View 1 2 3 4 5 6 7 37 chunks +802 lines, -414 lines 0 comments Download Lib/xml/etree/__init__.py View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download Modules/_elementtree.c View 1 2 3 4 5 6 7 47 chunks +506 lines, -253 lines 0 comments Download Messages Total messages: 38 Expand All Messages Collapse All Messages Expand All Messages Collapse All Messages