Christian Heimes
7ed4294d7f
Add missing check of PyDict_Update()'s return value in _elementtree.c
CID 719637
13 years ago
Ronald Oussoren
138d080a28
#18480 : Add missing PyType_Ready call to _elementtree extension
13 years ago
Eli Bendersky
6dc32b34dd
Issue #13612 : handle unknown encodings without a buffer overflow.
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
13 years ago
Serhiy Storchaka
66d53fa9ad
Issue #16986 : ElementTree now correctly parses a string input not only when
an internal XML encoding is UTF-8 or US-ASCII.
13 years ago
Eli Bendersky
6a55dc3b4a
Issue #17989 : fix typo in error message
13 years ago
Eli Bendersky
08231a9c6a
Issue #17901 : fix TreeBuilder construction for an explicit element_factory=None
Based on report and patch by Aaron Oakley.
13 years ago
Eli Bendersky
ef9683b73f
Issue #17989 : element_setattro returned incorrect error value.
This caused an exception to be raised later than expected.
13 years ago
Eli Bendersky
d4cb4b7451
Issue #17736 : fix misleading comment in _elementtree.c
Patch by Jonas Wagner
13 years ago
Eli Bendersky
25771b3749
Issue #16922 : fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text.
Patch by Serhiy Storchaka.
13 years ago
Eli Bendersky
b09b167419
Issue #16922 : fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text.
Patch by Serhiy Storchaka.
13 years ago
Eli Bendersky
4583990143
Clean trailing whitespace in _elementtree.c
13 years ago
Eli Bendersky
799e3edaf7
Issue #16076 : check for return value of PyTuple_New for args (following
Coverity report) and cleanup code.
13 years ago
Eli Bendersky
b8f6dc855c
Issue #16076 : fix refleak in pickling of Element.
Thanks to Ezio Melotti and Daniel Shahaf for the patch.
13 years ago
Eli Bendersky
e6174ca85e
Issue #16913 : Fix Element.itertext()'s handling of text with XML entities.
Patch by Serhiy Storchaka
13 years ago
Eli Bendersky
698bdb2a6c
Issue #16076 : make _elementtree.Element pickle-able in a way that is compatible
with the Python version of the class.
Patch by Daniel Shahaf.
13 years ago
Eli Bendersky
a873690d2c
The get() and iter() are now able to accept keyword arguments.
In conformance with the documentation and the Python version.
Patch by Franck Michea.
13 years ago
Antoine Pitrou
ee329318db
Issue #16089 : Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL).
13 years ago
Antoine Pitrou
c194884983
Sanitize and modernize some of the _elementtree code (see issue #16089 ).
13 years ago
Antoine Pitrou
ca8aa4acf6
Issue #15144 : Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
14 years ago
Eli Bendersky
ef391ac982
Raise ImportError if pyexpat's version is incompatible
14 years ago
Eli Bendersky
66099b0cdc
ISsue #14988 : restore Python 2's behavior of raising ImportError when unable to load pyexpat, instead of a SystemError/RuntimeError
14 years ago
Martin v. Löwis
bce166681c
Issue #14055 : Add __sizeof__ support to _elementtree.
14 years ago
Eli Bendersky
113da64259
Fix windows compilation problems caused by previous commit.
14 years ago
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.
14 years ago
Eli Bendersky
c68e1368b5
Fix unterminated keyword array passed to PyArg_ParseTupleAndKeywords
14 years ago
Eli Bendersky
2b6b73e7e1
Issue #14007 : implement doctype() method calling in XMLParser of _elementtree.
Includes exposing a doctype handler from expat through pyexpat.
14 years ago
Eli Bendersky
20d4174b3d
We're always building _elementtree with USE_PYEXPAT_CAPI, so the #ifdefs in
the code are unnecessary.
14 years ago
Eli Bendersky
52467b167e
Issue #14007 : make XMLParser a real subclassable type exported from _elementtree. +cleanups
14 years ago
Eli Bendersky
48d358ba86
Issue #14007 : implemented the 'element_factory' feature of TreeBuilder in
_elementtree, with a test.
14 years ago
Eli Bendersky
58d548dff1
Issue #14007 : make TreeBuilder an actual type exposed from _elementtree, and subclassable.
14 years ago
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.
14 years ago
Eli Bendersky
b20df95827
Issue #14849 : setup Element data members to be assignable in subclasses
14 years ago
Eli Bendersky
828efdea56
Replace bootstrap imports with real C API calls.
14 years ago
Eli Bendersky
08b852970e
Fix Windows compilation errors
14 years ago
Eli Bendersky
ebf37a2ffb
Fixes and enhancements to _elementtree:
* Fixed refleak problems when GC collection is run (see messages in
issue #14065 )
* Added weakref support to Element objects
14 years ago
Eli Bendersky
0192ba33b4
Issue #14065 : Added cyclic GC support to ET.Element
14 years ago
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
14 years ago
Eli Bendersky
5b77d81314
Issue #14207 : the ParseError exception raised by _elementtree was made
consistent to the one raised by the Python module (the 'code' attribute
was added).
In addition, the exception is now documented.
Added a test to check that ParseError has the required attributes, and
threw away the equivalent doctest which is no longer required.
14 years ago
Eli Bendersky
f996e775ea
Closes Issue #14246 : _elementtree parser will now handle io.StringIO
14 years ago
Eli Bendersky
865756a94c
Issue #14178 : Problem deleting slices with steps != +1 in the _elementtree module.
Fixed the problem and added some tests. Closes #14178
14 years ago
Florent Xicluna
50eee834fd
Issue #14007 : drop unused TreeBuilder().xml.
14 years ago
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.
14 years ago
Florent Xicluna
a72a98f24a
Issue #13988 : cElementTree is deprecated and the _elementtree accelerator is automatically used whenever available.
14 years ago
Florent Xicluna
f4bdf4e478
Issue #13988 : move the python bootstrap code to cElementTree.py, and remove obsolete code for Python 2.4 and 2.5.
14 years ago
Florent Xicluna
0965ee213e
Issue #2892 : preserve iterparse events in case of SyntaxError
14 years ago
Florent Xicluna
91d5193b3a
Closes #2892 : preserve iterparse events in case of SyntaxError.
14 years ago
Florent Xicluna
67d5d0ed44
Closes #7334 : close source files on ElementTree.parse and iterparse (partial backport of issue #10093 from 3.2).
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
14 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
14 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
15 years ago