summaryrefslogtreecommitdiffstats
path: root/Lib/xml/etree/ElementTree.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Issue #17988: remove unused alias for Element and rename the used oneEli Bendersky2013-05-191-18/+6
| | | | | | | | | | | | | | | | | | | | | Renaming to _Element_Py for clarity and moving it to a more logical location. _ElementInterface OTOH is unused and is therefore removed. Close #17988
* | | _elementtree.XMLParser._setevents should support any sequence, not just tuplesEli Bendersky2013-05-191-12/+17
| | | | | | | | | | | | Also clean up some code around this
* | | Remove superfluous try/exceptEli Bendersky2013-04-201-12/+6
| | |
* | | Make license notices more consistent and remove old changelog.Eli Bendersky2013-04-201-4/+3
| | | | | | | | | | | | Also remove unused macro.
* | | Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for ↵Antoine Pitrou2013-04-181-109/+94
| | | | | | | | | | | | non-blocking applications.
* | | Issue #17516: use comment syntax for comments, instead of multiline stringVictor Stinner2013-03-261-1/+1
| | |
* | | Issue #16954: Add docstrings for ElementTreeEli Bendersky2013-03-091-578/+486
| | | | | | | | | | | | Based on patch by David Lam
* | | Issue #9708: Fix support for iterparse(parser=...) argument per documentation.Eli Bendersky2013-01-241-3/+16
|\ \ \ | |/ / | | | | | | | | | When _elementtree is imported, iterparse is redefined as a class and the parser argument was ommitted. Fix this, and add a docstring to the class.
| * | Issue #9708: Fix support for iterparse(parser=...) argument per documentation.Eli Bendersky2013-01-241-3/+16
| | | | | | | | | | | | | | | When _elementtree is imported, iterparse is redefined as a class and the parser argument was ommitted. Fix this, and add a docstring to the class.
* | | Cleanup the docs ElementTree a bit.Serhiy Storchaka2013-01-131-8/+8
|\ \ \ | |/ /
| * | Describe the default_namespace parameter of ElemetTree.write.Serhiy Storchaka2013-01-131-2/+3
| |\ \ | | |/
| | * Describe the default_namespace parameter of ElemetTree.write.Serhiy Storchaka2013-01-131-2/+3
| | |
* | | Cleanup the docs ElementTree a bit and describe the default_namespace ↵Eli Bendersky2013-01-131-14/+14
| | | | | | | | | | | | parameter. In the code, replace the old outdated Doxygen-ish comment above ElementTree.write by a proper docstring.
* | | Close #14377: Add a new parameter to ElementTree.write and some module-levelEli Bendersky2013-01-131-11/+20
| | | | | | | | | | | | | | | | | | | | | serialization functions - short_empty_elements. It controls how elements without contents are emitted. Patch by Serhiy Storchaka. Feature initially proposed by Ariel Poliak.
* | | Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element ↵Antoine Pitrou2012-10-041-1/+3
|\ \ \ | |/ / | | | | | | element_factory (fixes a regression in SimpleTAL).
| * | Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element ↵Antoine Pitrou2012-10-041-1/+3
| | | | | | | | | | | | element_factory (fixes a regression in SimpleTAL).
* | | more yield fromPhilip Jenvey2012-10-011-4/+2
|/ / | | | | | | patch by Serhiy Storchaka
* | #15970: merge with 3.2.Ezio Melotti2012-09-191-1/+1
|\ \ | |/
| * #15970: xml.etree.ElementTree now serializes correctly the empty HTML ↵Ezio Melotti2012-09-191-1/+1
| | | | | | | | elements "meta" and "param".
* | fix whitespace woesEli Bendersky2012-07-171-1/+1
| |
* | Optimize tostringlist by taking the stream class outside the function. It's ↵Eli Bendersky2012-07-171-13/+19
| | | | | | | | now 2x faster on short calls. Related to #1767933
* | Preserve the invariant tostring(elem) == b''.join(tostringlist(elem)) and ↵Eli Bendersky2012-07-171-0/+6
| | | | | | | | add a test to make sure it keeps working
* | Close #1767933: Badly formed XML using etree and utf-16. Patch by Serhiy ↵Eli Bendersky2012-07-151-56/+82
| | | | | | | | Storchaka, with some minor fixes by me
* | Minor refactoring in xml.etree.ElementTree doctype parser.Florent Xicluna2012-07-071-2/+2
| |
* | Removed _SimpleElementPath and its flaky test. The test monkey-patches the ↵Eli Bendersky2012-06-151-25/+1
| | | | | | | | module, which causes other failures and fails itself depending on the order tests are run.
* | Replace the iter/itertext methods of Element in _elementtree with true C ↵Eli Bendersky2012-06-151-5/+1
| | | | | | | | | | | | implementations, instead of the bootstrapped Python code. In addition to being cleaner (removing the last remains of the bootstrapping code in _elementtree), this gives a 10x performance boost for iter() on large documents. Also reorganized the tests a bit to be more robust.
* | Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.Eli Bendersky2012-05-291-0/+3
| | | | | | | | | | Add attrib keyword to Element and SubElement in _elementtree. Patch developed with Ezio Melotti.
* | Issue #13782: streamline argument type-checking in ET.ElementEli Bendersky2012-03-231-4/+8
| | | | | | | | | | | | | | | | append, extend and insert now consistently type-check their argument in both the C and Python implementations, and raise TypeError for non-Element argument. Added tests
* | Flatten nested try ... finally, try ... except.Florent Xicluna2012-03-051-6/+5
| |
* | Issue #14007: accept incomplete TreeBuilder objects (missing ↵Florent Xicluna2012-03-051-41/+40
| | | | | | | | start/end/data/close) for the Python implementation as well. Add disabled tests for the doctype() method.
* | Issue #14128: Exposing Element as an actual type from _elementtree, rather ↵Eli Bendersky2012-03-041-1/+0
| | | | | | | | | | | | | | | | than a factory function. This makes the C implementation more aligned with the Python implementation. Also added some tests to ensure that Element is now a type and that it can be subclassed.
* | fix the _namespace_map cleanup for cElementTree tests.Florent Xicluna2012-02-161-0/+2
| |
* | Issue #13988: cElementTree is deprecated and the _elementtree accelerator is ↵Florent Xicluna2012-02-131-4/+86
|/ | | | automatically used whenever available.
* Closes #2892: preserve iterparse events in case of SyntaxError.Florent Xicluna2011-11-011-15/+23
|
* #10777: fix iteration over dict keys while mutating the dict.Georg Brandl2010-12-281-1/+1
|
* Guard against rogue tuples.Georg Brandl2010-12-091-1/+1
|
* #10661: give QName a nicer repr.Georg Brandl2010-12-091-0/+2
|
* Fix Issue10205 - XML QName error when different tags have same QName.Senthil Kumaran2010-11-091-2/+3
|
* Issue #10093: ResourceWarnings are now issued when files and sockets areAntoine Pitrou2010-10-291-11/+22
| | | | | deallocated without explicit closing. These warnings are silenced by default, except in pydebug mode.
* Issue #8047: Fix the xml.etree serializer to return bytes by default.Florent Xicluna2010-08-081-25/+34
| | | | Use ``encoding="unicode"`` to generate a Unicode string.
* Merged revisions 78838-78839,78917,78919,78934,78937 via svnmerge fromFlorent Xicluna2010-03-131-387/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78838 | florent.xicluna | 2010-03-11 15:36:19 +0100 (jeu, 11 mar 2010) | 2 lines Issue #6472: The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too. ........ r78839 | florent.xicluna | 2010-03-11 16:55:11 +0100 (jeu, 11 mar 2010) | 2 lines Fix repr of tree Element on windows. ........ r78917 | florent.xicluna | 2010-03-13 12:18:49 +0100 (sam, 13 mar 2010) | 2 lines Move the xml test data to their own directory. ........ r78919 | florent.xicluna | 2010-03-13 13:41:48 +0100 (sam, 13 mar 2010) | 2 lines Do not chdir when running test_xml_etree, and enhance the findfile helper. ........ r78934 | florent.xicluna | 2010-03-13 18:56:19 +0100 (sam, 13 mar 2010) | 2 lines Update some parts of the xml.etree documentation. ........ r78937 | florent.xicluna | 2010-03-13 21:30:15 +0100 (sam, 13 mar 2010) | 3 lines Add the keyword argument "method=None" to the .write() method and the tostring/tostringlist functions. Update the function, class and method signatures, according to the new convention. ........
* Merged revisions 78125 via svnmerge fromAntoine Pitrou2010-02-091-2/+2
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78125 | antoine.pitrou | 2010-02-09 18:08:05 +0100 (mar., 09 févr. 2010) | 7 lines Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in XML processing instructions and comments. These raw characters are allowed by the XML specification, and are necessary when outputting e.g. PHP code in a processing instruction. Patch by Neil Muller. ........
* Issue #6233: ElementTree failed converting unicode characters to XMLAntoine Pitrou2010-02-091-6/+9
| | | | | entities when they could't be represented in the requested output encoding. Patch by Jerry Chen.
* Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ fromMark Dickinson2009-01-271-3/+23
| | | | the standard library and tests.
* SF patch# 1770008 by Christian Heimes (plus some extras).Guido van Rossum2007-08-091-12/+17
| | | | | | | | | | Completely get rid of StringIO.py and cStringIO.c. I had to fix a few tests and modules beyond what Christian did, and invent a few conventions. E.g. in elementtree, I chose to write/return Unicode strings whe no encoding is given, but bytes when an explicit encoding is given. Also mimetools was made to always assume binary files.
* Patch #1762412: Fix test case for struni branch.Martin v. Löwis2007-07-281-44/+20
|
* PEP 3114: rename .next() to .__next__() and add next() builtin.Georg Brandl2007-04-211-2/+2
|
* Remove functions in string module that are also string methods. Also remove:Neal Norwitz2007-04-171-16/+16
| | | | | * all calls to functions in the string module (except maketrans) * everything from stropmodule except for maketrans() which is still used
* - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;Guido van Rossum2007-02-111-1/+1
| | | | | | | | | | and .keys(), .items(), .values() return dict views. The dict views aren't fully functional yet; in particular, they can't be compared to sets yet. but they are useful as "iterator wells". There are still 27 failing unit tests; I expect that many of these have fairly trivial fixes, but there are so many, I could use help.
* Jacques Frechet's and John Reese's simplification of ElementTree: give upAlex Martelli2006-08-211-27/+1
| | | | | attempts at backwards compatibility which can't work anyway on Py3k (and aren't needed for Python 2.5 and later).