Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(292)

Issue 207048: merge upstream ElementTree 1.3 and cElementTree 1.0.6 in /python/trunk/ (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 8 months ago by flox
Modified:
14 years, 7 months 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
flox
14 years, 8 months ago (2010-02-09 23:37:48 UTC) #1
flox
Clarify the encoded bytestring. http://codereview.appspot.com/207048/diff/1005/10 File Lib/test/test_xml_etree.py (right): http://codereview.appspot.com/207048/diff/1005/10#newcode260 Lib/test/test_xml_etree.py:260: >>> e = ET.XML("<?xml version='1.0' ...
14 years, 8 months ago (2010-02-10 08:15:27 UTC) #2
flox
Added developer foreword on all modules, to ease the review. It is very close to ...
14 years, 8 months ago (2010-02-10 09:34:36 UTC) #3
flox
http://codereview.appspot.com/207048/diff/1005/10 File Lib/test/test_xml_etree.py (right): http://codereview.appspot.com/207048/diff/1005/10#newcode251 Lib/test/test_xml_etree.py:251: >>> ET.tostring(ET.PI('test', u'<testing&>\xe3'), 'latin1') Backported from py3k: r78126 http://codereview.appspot.com/207048/diff/1005/10#newcode256 ...
14 years, 8 months ago (2010-02-10 12:15:38 UTC) #4
Antoine Pitrou
http://codereview.appspot.com/207048/diff/1005/12 File Lib/xml/etree/ElementTree.py (left): http://codereview.appspot.com/207048/diff/1005/12#oldcode1237 Lib/xml/etree/ElementTree.py:1237: pass Is this method deprecated? It seems to disappear ...
14 years, 8 months ago (2010-02-10 13:14:37 UTC) #5
flox
http://codereview.appspot.com/207048/diff/1005/12 File Lib/xml/etree/ElementTree.py (left): http://codereview.appspot.com/207048/diff/1005/12#oldcode1237 Lib/xml/etree/ElementTree.py:1237: pass On 2010/02/10 13:14:37, Antoine Pitrou wrote: > Is ...
14 years, 8 months ago (2010-02-10 14:31:40 UTC) #6
flox
First iteration, and document the deprecation of XMLParser.doctype(...)
14 years, 8 months ago (2010-02-11 18:35:22 UTC) #7
fredrik_pythonware.com
You do realize that you're merging in an experimental release, right? I'm a bit worried ...
14 years, 8 months ago (2010-02-11 18:39:08 UTC) #8
flox
Merge *all* tests from upstream. Fix refleaks on ParseError and E.attrib.
14 years, 8 months ago (2010-02-12 11:46:32 UTC) #9
flox
On 2010/02/11 18:39:08, fredrik_pythonware.com wrote: > You do realize that you're merging in an experimental ...
14 years, 8 months ago (2010-02-12 13:59:50 UTC) #10
flox
http://codereview.appspot.com/207048/diff/1035/50 File Modules/_elementtree.c (right): http://codereview.appspot.com/207048/diff/1035/50#newcode799 Modules/_elementtree.c:799: seq = PySequence_Fast(seq_in, ""); Don't miss this one, next ...
14 years, 8 months ago (2010-02-12 14:07:23 UTC) #11
Antoine Pitrou
http://codereview.appspot.com/207048/diff/1035/50 File Modules/_elementtree.c (left): http://codereview.appspot.com/207048/diff/1035/50#oldcode1409 Modules/_elementtree.c:1409: element_setslice, If element_setslice and element_getslice aren't used anymore, they ...
14 years, 8 months ago (2010-02-12 15:27:45 UTC) #12
flox
http://codereview.appspot.com/207048/diff/1035/50 File Modules/_elementtree.c (left): http://codereview.appspot.com/207048/diff/1035/50#oldcode1409 Modules/_elementtree.c:1409: element_setslice, On 2010/02/12 15:27:46, Antoine Pitrou wrote: > If ...
14 years, 8 months ago (2010-02-12 16:07:47 UTC) #13
flox
Add tests for the C API. Drop unused "element_(get|set)slice".
14 years, 8 months ago (2010-02-15 13:20:58 UTC) #14
Antoine Pitrou
http://codereview.appspot.com/207048/diff/67/1054 File Modules/_testcapimodule.c (right): http://codereview.appspot.com/207048/diff/67/1054#newcode1311 Modules/_testcapimodule.c:1311: childob = (*capi->getitem)(newob, 0); You should check that childob ...
14 years, 8 months ago (2010-02-15 15:06:56 UTC) #15
flox
http://codereview.appspot.com/207048/diff/67/1054 File Modules/_testcapimodule.c (right): http://codereview.appspot.com/207048/diff/67/1054#newcode1338 Modules/_testcapimodule.c:1338: strcmp(PyString_AS_STRING(snapshot.tag), "document") != 0) { On 2010/02/15 15:06:56, Antoine ...
14 years, 8 months ago (2010-02-15 16:42:32 UTC) #16
flox
Extend test coverage with #6232. Fix regression in E.findtext...
14 years, 8 months ago (2010-02-16 22:38:37 UTC) #17
flox
On 2010/02/16 22:38:37, flox wrote: > Extend test coverage with #6232. Fix regression in E.findtext... ...
14 years, 8 months ago (2010-02-17 09:12:42 UTC) #18
flox
On 2010/02/17 09:12:42, flox wrote: > > Versions proposed for 2.7: > * ElementTree 1.3 ...
14 years, 8 months ago (2010-02-17 09:31:46 UTC) #19
fredrik_pythonware.com
Since you've effectively hijacked the library, and have created your own fork that's not fully ...
14 years, 8 months ago (2010-02-17 09:40:12 UTC) #20
flox
On 2010/02/17 09:40:12, fredrik_pythonware.com wrote: > Since you've effectively hijacked the library, and have created ...
14 years, 8 months ago (2010-02-17 10:12:13 UTC) #21
Antoine Pitrou
Fredrik, > Since you've effectively hijacked the library, and have created your > own fork ...
14 years, 8 months ago (2010-02-17 12:06:35 UTC) #22
fredrik_pythonware.com
The problem is that you're merging in features from a version that has never been ...
14 years, 8 months ago (2010-02-17 12:43:14 UTC) #23
flox
Split out experimental C API.
14 years, 8 months ago (2010-02-18 11:00:02 UTC) #24
flox
On 2010/02/17 12:43:14, fredrik_pythonware.com wrote: > The problem is that you're merging in features from ...
14 years, 8 months ago (2010-02-19 09:30:46 UTC) #25
flox
Rebase the patch on the Mercurial repository.
14 years, 8 months ago (2010-02-26 09:28:04 UTC) #26
effbot
Finally managed to set aside enough time to review both the mercurial fork and this ...
14 years, 8 months ago (2010-03-09 10:38:43 UTC) #27
flox
See my answers below. I don't get the point about ValueError versus ImportError. I will ...
14 years, 8 months ago (2010-03-10 06:02:33 UTC) #28
flox
http://codereview.appspot.com/207048/diff/8001/9010 File Modules/_elementtree.c (left): http://codereview.appspot.com/207048/diff/8001/9010#oldcode2699 Modules/_elementtree.c:2699: "def getiterator(node, tag=None):\n" /* helper */ Note: the C ...
14 years, 8 months ago (2010-03-10 06:12:38 UTC) #29
effbot
Some followup comments. http://codereview.appspot.com/207048/diff/8001/9006 File Lib/xml/etree/ElementTree.py (right): http://codereview.appspot.com/207048/diff/8001/9006#newcode790 Lib/xml/etree/ElementTree.py:790: raise ValueError("unknown method %r" % method) ...
14 years, 8 months ago (2010-03-10 14:37:25 UTC) #30
flox
Comments about E.getiterator() and support of C14N serializer. I will push some changes to Mercurial ...
14 years, 8 months ago (2010-03-10 15:17:32 UTC) #31
effbot
http://codereview.appspot.com/207048/diff/8001/9006 File Lib/xml/etree/ElementTree.py (right): http://codereview.appspot.com/207048/diff/8001/9006#newcode1642 Lib/xml/etree/ElementTree.py:1642: from ElementC14N import _serialize_c14n It's a bad idea in ...
14 years, 8 months ago (2010-03-10 15:46:16 UTC) #32
flox
http://codereview.appspot.com/207048/diff/8001/9010 File Modules/_elementtree.c (left): http://codereview.appspot.com/207048/diff/8001/9010#oldcode2699 Modules/_elementtree.c:2699: "def getiterator(node, tag=None):\n" /* helper */ On 2010/03/10 15:46:16, ...
14 years, 8 months ago (2010-03-10 16:02:58 UTC) #33
effbot
(this got stuck in review mode; trying again) http://codereview.appspot.com/207048/diff/8001/9010 File Modules/_elementtree.c (left): http://codereview.appspot.com/207048/diff/8001/9010#oldcode2699 Modules/_elementtree.c:2699: "def ...
14 years, 7 months ago (2010-03-11 12:45:46 UTC) #34
flox
Ready for merge in trunk?
14 years, 7 months ago (2010-03-11 14:16:07 UTC) #35
fredrik_pythonware.com
I sampled the patch deltas for the modules we've discussed lately, and assuming you haven't ...
14 years, 7 months ago (2010-03-11 14:24:00 UTC) #36
flox
About serializer encoding
14 years, 7 months ago (2010-03-22 08:36:14 UTC) #37
flox
14 years, 7 months ago (2010-03-22 09:33:59 UTC) #38
Thank you for reviewing.
It is merged in trunk (r78838) and 3.x (r78942).

There's a different issue opened about serializer encoding:
http://codereview.appspot.com/664043
http://bugs.python.org/issue8047
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b