Serhiy Storchaka
91b0bc237c
Issue #20331 : Fixed possible FD leaks in various modules:
...
http.server, imghdr, mailcap, mimetypes, xml.etree.
2014-01-25 19:43:02 +02:00
Andrew Kuchling
98a0d063a1
Closes #12828 : add docstring text noting this is an internal-only module
2013-11-12 10:25:15 -05:00
Benjamin Peterson
72a98541f0
remove duplicate method ( closes #19127 )
2013-09-29 11:15:31 -04:00
Ezio Melotti
b5bc353b88
#18741 : fix more typos. Patch by Févry Thibault.
2013-08-17 16:11:40 +03:00
Eli Bendersky
2acc525a97
Issue #17011 : Fix caching of xpath path when namespaces are present.
...
Thanks to Stefan Behnel for the report and proposed solution & test.
2013-08-03 17:47:47 -07:00
Christian Heimes
54ad7e39df
Issue #18347 : ElementTree's html serializer now preserves the case of closing tags.
2013-07-05 01:39:49 +02:00
Serhiy Storchaka
3eab6b363a
Issue #17606 : Fixed support of encoded byte strings in the XMLGenerator
...
characters() and ignorableWhitespace() methods. Original patch by Sebastian
Ortiz Vasquez.
2013-05-12 17:31:16 +03:00
Georg Brandl
64949fa20e
merge with 3.2
2013-05-12 11:52:22 +02:00
Georg Brandl
c502df4e3e
Issue #17915 : Fix interoperability of xml.sax with file objects returned by
...
codecs.open().
2013-05-12 11:41:12 +02:00
Eli Bendersky
72cdb5c39e
Issue #11367 : fix documentation of some find* methods in ElementTree
2013-03-12 06:04:33 -07:00
Eli Bendersky
7343cb0790
Issue #11367 : fix documentation of some find* methods in ElementTree
2013-03-12 06:01:22 -07:00
Serhiy Storchaka
9fef188c9e
Issue #1470548 : XMLGenerator now works with binary output streams.
2013-02-10 14:31:07 +02:00
Serhiy Storchaka
88efc52d74
Issue #1470548 : XMLGenerator now works with binary output streams.
2013-02-10 14:29:52 +02:00
Eli Bendersky
aaa9780fe1
Issue #9708 : Fix support for iterparse(parser=...) argument per documentation.
...
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.
2013-01-24 07:15:19 -08:00
Ezio Melotti
564e4d8dc9
#11379 : merge with 3.2.
2013-01-22 22:49:46 +02:00
Ezio Melotti
da4b5b82a3
#11379 : rephrase minidom documentation to use the term "minimal" instead of "lightweight". Patch by Éric Araujo.
2013-01-22 22:47:57 +02:00
Serhiy Storchaka
f1b045f417
Describe the default_namespace parameter of ElemetTree.write.
2013-01-13 22:04:43 +02:00
Serhiy Storchaka
03530b980e
Describe the default_namespace parameter of ElemetTree.write.
2013-01-13 21:58:04 +02:00
Andrew Svetlov
5b89840d9c
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:26:36 +02:00
Andrew Svetlov
737fb89dd1
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:14:22 +02:00
Antoine Pitrou
ee329318db
Issue #16089 : Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL).
2012-10-04 19:53:29 +02:00
Ezio Melotti
ab9b661fdd
#15970 : merge with 3.2.
2012-09-19 08:25:01 +03:00
Ezio Melotti
c90111f9ab
#15970 : xml.etree.ElementTree now serializes correctly the empty HTML elements "meta" and "param".
2012-09-19 08:19:12 +03:00
Eli Bendersky
f90fc68db4
fix whitespace woes
2012-07-17 15:09:56 +03:00
Eli Bendersky
43cc5f29a8
Optimize tostringlist by taking the stream class outside the function. It's now 2x faster on short calls. Related to #1767933
2012-07-17 15:09:12 +03:00
Eli Bendersky
426e248feb
Preserve the invariant tostring(elem) == b''.join(tostringlist(elem)) and add a test to make sure it keeps working
2012-07-17 05:45:11 +03:00
Eli Bendersky
00f402bfcb
Close #1767933 : Badly formed XML using etree and utf-16. Patch by Serhiy Storchaka, with some minor fixes by me
2012-07-15 06:02:22 +03:00
Eli Bendersky
8a80502d2c
Issue #15296 : Fix minidom.toxml/toprettyxml for non-unicode encodings. Patch by Serhiy Storchaka, with some minor style adjustments by me.
2012-07-13 09:52:39 +03:00
Florent Xicluna
a1c974a66d
Minor refactoring in xml.etree.ElementTree doctype parser.
2012-07-07 13:16:44 +02:00
Eli Bendersky
27cbb19ae5
Removed _SimpleElementPath and its flaky test. The test monkey-patches the module, which causes other failures and fails itself depending on the order tests are run.
2012-06-15 09:03:19 +03:00
Eli Bendersky
64d11e60f2
Replace the iter/itertext methods of Element in _elementtree with true C 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.
2012-06-15 07:42:50 +03:00
Eli Bendersky
737b173355
Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.
...
Add attrib keyword to Element and SubElement in _elementtree.
Patch developed with Ezio Melotti.
2012-05-29 06:02:56 +03:00
Eli Bendersky
396e8fcf36
Issue #13782 : streamline argument type-checking in ET.Element
...
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
2012-03-23 14:24:20 +02:00
Florent Xicluna
8cf4b51fa4
xml.dom.minidom: add more __slots__ to limit resource usage.
2012-03-05 12:37:02 +01:00
Florent Xicluna
6c75301eb6
xml.dom: fix typo, drop unused imports.
2012-03-05 12:35:15 +01:00
Florent Xicluna
fb06746852
Flatten nested try ... finally, try ... except.
2012-03-05 11:42:49 +01:00
Florent Xicluna
75b5e7ee15
Issue #14007 : accept incomplete TreeBuilder objects (missing start/end/data/close) for the Python implementation as well. Add disabled tests for the doctype() method.
2012-03-05 10:42:19 +01:00
Martin v. Löwis
67245a6ed4
Issue #14168 : Check for presence of _attrs before accessing it.
2012-03-05 07:01:49 +01:00
Eli Bendersky
092af1fc5c
Issue #14128 : Exposing Element as an actual type from _elementtree, rather 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.
2012-03-04 07:14:03 +02:00
Martin v. Löwis
7b77188e89
Create _attr/_attrNS lazily.
2012-02-19 20:55:05 +01:00
Martin v. Löwis
14aa280de2
Use __slots__ throughout instead of __dict__, to reduce the memory usage.
2012-02-19 20:25:12 +01:00
Florent Xicluna
1639505c38
fix the _namespace_map cleanup for cElementTree tests.
2012-02-16 23:28:35 +01:00
Florent Xicluna
a72a98f24a
Issue #13988 : cElementTree is deprecated and the _elementtree accelerator is automatically used whenever available.
2012-02-13 11:03:30 +01:00
Florent Xicluna
f4bdf4e478
Issue #13988 : move the python bootstrap code to cElementTree.py, and remove obsolete code for Python 2.4 and 2.5.
2012-02-11 11:28:16 +01:00
Florent Xicluna
313b2ad1a8
Fix imports in xml.dom.
2011-12-10 21:14:53 +01:00
Ezio Melotti
def4728fd6
#4147 : merge with 3.2.
2011-11-18 17:36:07 +02:00
Ezio Melotti
8008f2aba0
#4147 : minidom's toprettyxml no longer adds whitespace around a text node when it is the only child of an element. Initial patch by Dan Kenigsberg.
2011-11-18 17:34:26 +02:00
Florent Xicluna
91d5193b3a
Closes #2892 : preserve iterparse events in case of SyntaxError.
2011-11-01 23:31:09 +01:00
Florent Xicluna
f24e7e6c41
Merge 3.2: issue #2892
2011-11-01 23:33:14 +01:00
R David Murray
1d30db459d
merge #4147 : minidom's toprettyxml no longer adds whitespace to text nodes.
2011-10-01 16:22:35 -04:00