summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
Commit message (Collapse)AuthorAgeFilesLines
* Add missing check of PyDict_Update()'s return value in _elementtree.cChristian Heimes2013-07-201-1/+2
|\ | | | | | | CID 719637
| * Add missing check of PyDict_Update()'s return value in _elementtree.cChristian Heimes2013-07-201-1/+2
| | | | | | | | CID 719637
* | (3.3->default): #18480: Add missing PyType_Ready call to _elementtree extensionRonald Oussoren2013-07-191-5/+9
|\ \ | |/
| * #18480: Add missing PyType_Ready call to _elementtree extensionRonald Oussoren2013-07-191-5/+9
| |
* | Issue #18408: Fix _elementtree.c, don't call Python function from an expatVictor Stinner2013-07-181-0/+28
| | | | | | | | handler if a Python exception is set
* | Issue #18408: Fix constructors of _elementtree.cVictor Stinner2013-07-121-12/+15
| | | | | | | | | | | | * Use Py_DECREF() instead of PyObject_GC_Del() to release correctly all resources * Raise MemoryError on memory allocation failure
* | Issue #18408: Fix create_extra() of _elementtree.c, raise MemoryError on memoryVictor Stinner2013-07-121-1/+3
| | | | | | | | allocation failure
* | Issue #18408: Different fixes in _elementtree.c to handle correctly MemoryErrorVictor Stinner2013-07-111-8/+14
| | | | | | | | | | | | | | | | | | | | * create_new_element() initializes all attributes before handling errors, to fix a crash in the destructor * create_new_element() calls PyObject_GC_Del() on error, instead of PyObject_Del(), because the object was created by PyObject_GC_New() * subelement() now handles create_new_element() failure * element_getattro() now handles element_get_text() failure * makeuniversal() now handles PyBytes_FromStringAndSize() failure
* | Cleanup _elementtree.cVictor Stinner2013-07-111-7/+6
| |
* | Issue #18408: _elementtree.c now handles create_extra() failureVictor Stinner2013-07-111-12/+24
| |
* | Issue #13612: handle unknown encodings without a buffer overflow.Eli Bendersky2013-05-251-42/+1
|\ \ | |/ | | | | | | | | | | This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new function - DefaultUnknownEncodingHandler. Based on a patch by Serhiy Storchaka.
| * Issue #13612: handle unknown encodings without a buffer overflow.Eli Bendersky2013-05-251-42/+1
| | | | | | | | | | | | | | This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new function - DefaultUnknownEncodingHandler. Based on a patch by Serhiy Storchaka.
* | Issue #16986: ElementTree now correctly parses a string input not only whenSerhiy Storchaka2013-05-221-9/+30
|\ \ | |/ | | | | an internal XML encoding is UTF-8 or US-ASCII.
| * Issue #16986: ElementTree now correctly parses a string input not only whenSerhiy Storchaka2013-05-221-9/+30
| | | | | | | | an internal XML encoding is UTF-8 or US-ASCII.
* | Get rid of ugly code duplication for ElementTree.parse when the acceleratorEli Bendersky2013-05-201-4/+3
| | | | | | | | | | is imported. Instead, ElementTree.parse can look for a special internal method defined by the accelerator.
* | Issue #17989: fix typo in error messageEli Bendersky2013-05-201-1/+1
|\ \ | |/
| * Issue #17989: fix typo in error messageEli Bendersky2013-05-191-1/+1
| |
* | _elementtree.XMLParser._setevents should support any sequence, not just tuplesEli Bendersky2013-05-191-46/+42
| | | | | | | | Also clean up some code around this
* | Issue #17901: fix TreeBuilder construction for an explicit element_factory=NoneEli Bendersky2013-05-181-1/+1
|\ \ | |/ | | | | Based on report and patch by Aaron Oakley.
| * Issue #17901: fix TreeBuilder construction for an explicit element_factory=NoneEli Bendersky2013-05-181-1/+1
| | | | | | | | Based on report and patch by Aaron Oakley.
* | Issue #17989: element_setattro returned incorrect error value.Eli Bendersky2013-05-181-8/+8
|\ \ | |/ | | | | This caused an exception to be raised later than expected.
| * Issue #17989: element_setattro returned incorrect error value.Eli Bendersky2013-05-181-8/+8
| | | | | | | | This caused an exception to be raised later than expected.
* | Revert c9674421d78e, leaving an additional commentEli Bendersky2013-04-241-5/+10
| |
* | Simplify the code of get_attrib_from_keywords somewhat.Eli Bendersky2013-04-221-9/+5
| |
* | Issue #17736: fix misleading comment in _elementtree.cEli Bendersky2013-04-221-1/+3
|\ \ | |/ | | | | Patch by Jonas Wagner
| * Issue #17736: fix misleading comment in _elementtree.cEli Bendersky2013-04-221-1/+3
| | | | | | | | Patch by Jonas Wagner
* | Remove useless #define and #ifdefsEli Bendersky2013-04-201-11/+0
| |
* | Make license notices more consistent and remove old changelog.Eli Bendersky2013-04-201-43/+5
|/ | | | Also remove unused macro.
* Issue #16922: fixed findtext() to return empty Unicode string instead of ↵Eli Bendersky2013-01-131-1/+1
| | | | | | empty bytes object when there's no text. Patch by Serhiy Storchaka.
* Clean trailing whitespace in _elementtree.cEli Bendersky2013-01-131-4/+4
|
* Issue #16076: check for return value of PyTuple_New for args (followingEli Bendersky2013-01-121-8/+11
| | | | Coverity report) and cleanup code.
* Issue #16076: fix refleak in pickling of Element.Eli Bendersky2013-01-121-11/+5
| | | | Thanks to Ezio Melotti and Daniel Shahaf for the patch.
* Issue #16913: Fix Element.itertext()'s handling of text with XML entities.Eli Bendersky2013-01-101-3/+14
| | | | Patch by Serhiy Storchaka
* Issue #16076: make _elementtree.Element pickle-able in a way that is compatibleEli Bendersky2013-01-101-3/+177
| | | | | | with the Python version of the class. Patch by Daniel Shahaf.
* The get() and iter() are now able to accept keyword arguments.Eli Bendersky2013-01-051-8/+13
| | | | | In conformance with the documentation and the Python version. Patch by Franck Michea.
* Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element ↵Antoine Pitrou2012-10-041-28/+79
| | | | element_factory (fixes a regression in SimpleTAL).
* Sanitize and modernize some of the _elementtree code (see issue #16089).Antoine Pitrou2012-10-011-107/+59
|
* Issue #15144: Fix possible integer overflow when handling pointers as ↵Antoine Pitrou2012-09-201-1/+1
| | | | | | integer values, by using Py_uintptr_t instead of size_t. Patch by Serhiy Storchaka.
* Raise ImportError if pyexpat's version is incompatibleEli Bendersky2012-07-211-3/+5
|\
| * Raise ImportError if pyexpat's version is incompatibleEli Bendersky2012-07-211-4/+7
| |
* | Merge for #14988Eli Bendersky2012-07-171-5/+1
|\ \ | |/
| * ISsue #14988: restore Python 2's behavior of raising ImportError when unable ↵Eli Bendersky2012-07-171-0/+2
| | | | | | | | to load pyexpat, instead of a SystemError/RuntimeError
* | Issue #14055: Add __sizeof__ support to _elementtree.Martin v. Löwis2012-06-171-0/+14
| |
* | Fix windows compilation problems caused by previous commit.Eli Bendersky2012-06-151-2/+4
| |
* | Replace the iter/itertext methods of Element in _elementtree with true C ↵Eli Bendersky2012-06-151-90/+272
| | | | | | | | | | | | 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.
* | Fix unterminated keyword array passed to PyArg_ParseTupleAndKeywordsEli Bendersky2012-06-031-2/+2
| |
* | Issue #14007: implement doctype() method calling in XMLParser of _elementtree.Eli Bendersky2012-06-011-10/+99
| | | | | | | | Includes exposing a doctype handler from expat through pyexpat.
* | We're always building _elementtree with USE_PYEXPAT_CAPI, so the #ifdefs inEli Bendersky2012-06-011-12/+2
| | | | | | | | the code are unnecessary.
* | Issue #14007: make XMLParser a real subclassable type exported from ↵Eli Bendersky2012-06-011-110/+140
| | | | | | | | _elementtree. +cleanups
* | Issue #14007: implemented the 'element_factory' feature of TreeBuilder inEli Bendersky2012-05-301-30/+73
| | | | | | | | _elementtree, with a test.