summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of ↵Miss Islington (bot)2017-10-101-34/+28
| | | | | Element.text and Element.tail (GH-3924) (#3945) (cherry picked from commit 39ecb9c71b6e55d8a61a710d0144231bd88f9ada)
* [3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)Miss Islington (bot)2017-09-181-1/+5
| | | | | | | | | | * bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously by the garbage collector, because the parser was part of a reference cycle. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit e727d41ffcd91b21ce82026ec8c8381d34a16209)
* [3.6] bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). ↵Miss Islington (bot)2017-09-141-2/+33
| | | | | | | | (GH-3545) (#3585) * Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set. * Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions. (cherry picked from commit c8d8e15bfc24abeeaaf3d8be9073276b0c011cdf)
* bpo-31095: fix potential crash during GC (GH-3195)INADA Naoki2017-09-041-1/+3
| | | (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
* bpo-30892: Fix _elementtree module initialization (#2647) (#2649)Victor Stinner2017-07-101-0/+5
| | | | | Handle getattr(copy, 'deepcopy') error in _elementtree module initialization. (cherry picked from commit b136f11f3a51f9282ae992bac68f170ca5563b55)
* Expand the PySlice_GetIndicesEx macro. (#1023) (#1044)Serhiy Storchaka2017-04-081-6/+6
| | | (cherry picked from commit b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8)
* bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903)Serhiy Storchaka2017-03-301-48/+52
| | | | (cherry picked from commit 576def096ec7b64814e038f03290031f172886c3)
* Merge from 3.5.Serhiy Storchaka2016-12-211-0/+2
|\
| * Issue #28871: Fixed a crash when deallocate deep ElementTree.Serhiy Storchaka2016-12-211-0/+2
| |
* | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-3/+3
|\ \ | |/ | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
| * Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-3/+3
| | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* | Fix xml.etree.ElementTree.Element.getiterator()Victor Stinner2016-09-291-1/+1
| | | | | | | | | | Issue #28314: Fix function declaration (C flags) for the getiterator() method of xml.etree.ElementTree.Element.
* | replace PY_SIZE_MAX with SIZE_MAXBenjamin Peterson2016-09-071-1/+1
| |
* | replace Py_(u)intptr_t with the c99 standard typesBenjamin Peterson2016-09-061-4/+4
| |
* | Avoid calling functions with an empty string as format stringVictor Stinner2016-09-061-1/+1
| | | | | | | | Directly pass NULL rather than an empty string.
* | Rename _PyObject_FastCall() to _PyObject_FastCallDict()Victor Stinner2016-08-221-1/+1
| | | | | | | | | | | | | | | | Issue #27809: * Rename _PyObject_FastCall() function to _PyObject_FastCallDict() * Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1() macros calling _PyObject_FastCallDict()
* | _elementtree: deepcopy() now uses fast callVictor Stinner2016-08-191-8/+4
| | | | | | | | Issue #27128.
* | Issue #25455: Fixed a crash in repr of ElementTree.Element with recursive tag.Serhiy Storchaka2016-06-121-3/+16
|\ \ | |/
| * Issue #25455: Fixed a crash in repr of ElementTree.Element with recursive tag.Serhiy Storchaka2016-06-121-3/+16
| |
* | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-4/+4
|\ \ | |/ | | | | in places where Py_DECREF was used.
| * Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-4/+4
| | | | | | | | in places where Py_DECREF was used.
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-13/+13
|\ \ | |/
| * Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-11/+11
| |
* | Issue #20440: Cleaning up the code by using Py_SETREF.Serhiy Storchaka2016-01-051-3/+1
| |
* | Issue #20440: Cleaning up the code by using Py_SETREF and Py_CLEAR.Serhiy Storchaka2015-12-271-5/+1
| | | | | | | | | | Old code is correct, but with Py_SETREF and Py_CLEAR it can be cleaner. This patch doesn't fix bugs and hence there is no need to backport it.
* | Issue #20440: More use of Py_SETREF.Serhiy Storchaka2015-12-271-22/+12
|\ \ | |/ | | | | | | This patch is manually crafted and contains changes that couldn't be handled automatically.
| * Issue #20440: More use of Py_SETREF.Serhiy Storchaka2015-12-271-24/+14
| | | | | | | | | | This patch is manually crafted and contains changes that couldn't be handled automatically.
* | Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser.Serhiy Storchaka2015-12-241-19/+13
|\ \ | |/
| * Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser.Serhiy Storchaka2015-12-241-19/+13
| |
* | Issue #25869: Optimized deepcopying ElementTree; it is now 20 times faster.Serhiy Storchaka2015-12-211-24/+54
| |
* | Issue #25873: Optimized iterating ElementTree.Serhiy Storchaka2015-12-211-158/+101
| | | | | | | | | | Iterating elements Element.iter() is now 40% faster, iterating text Element.itertext() is now up to 2.5 times faster.
* | Issue #25902: Fixed various refcount issues in ElementTree iteration.Serhiy Storchaka2015-12-211-32/+58
|\ \ | |/
| * Issue #25902: Fixed various refcount issues in ElementTree iteration.Serhiy Storchaka2015-12-211-32/+58
| |
* | Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-1/+1
|\ \ | |/ | | | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
| * Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-1/+1
| | | | | | | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
* | Issue #25638: Optimized ElementTree parsing; it is now 10% faster.Serhiy Storchaka2015-12-101-9/+20
| |
* | Fixed possible leaks in ElementTree parser.Serhiy Storchaka2015-12-091-2/+8
|\ \ | |/
| * Fixed possible leaks in ElementTree parser.Serhiy Storchaka2015-12-091-2/+8
| |
* | Fixed possible leak in ElementTree.Element.iter().Serhiy Storchaka2015-12-091-11/+11
|\ \ | |/
| * Fixed possible leak in ElementTree.Element.iter().Serhiy Storchaka2015-12-091-11/+11
| |
* | Issue #25638: Optimized ElementTree.iterparse(); it is now 2x faster.Serhiy Storchaka2015-12-071-16/+19
| | | | | | | | | | ElementTree.XMLParser._setevents now accepts any objects with the append method, not just a list.
* | Issue25814: Propagate all errors from custom XML parser handlersSerhiy Storchaka2015-12-061-88/+39
|\ \ | |/ | | | | in ElementTree.iterparse().
| * Issue25814: Propagate all errors from custom XML parser handlersSerhiy Storchaka2015-12-061-88/+39
| |\ | | | | | | | | | in ElementTree.iterparse().
| | * Issue25814: Propagate all errors from custom XML parser handlersSerhiy Storchaka2015-12-061-88/+39
| | | | | | | | | | | | in ElementTree.iterparse().
| | * Issue #19687: Fixed possible integer overflows in ElementTree.Serhiy Storchaka2015-11-251-10/+34
| | | | | | | | | | | | Based on patch by Christian Heimes.
* | | Issue #7990: dir() on ElementTree.Element now lists properties: "tag",Serhiy Storchaka2015-11-251-76/+94
|/ / | | | | | | "text", "tail" and "attrib". Original patch by Santoso Wijaya.
* | Issue #25691: Fixed crash on deleting ElementTree.Element attributes.Serhiy Storchaka2015-11-231-0/+6
|\ \ | |/
| * Issue #25691: Fixed crash on deleting ElementTree.Element attributes.Serhiy Storchaka2015-11-231-0/+6
| |
* | Issue #19687: Fixed memory leak on failed Element slice assignment.Serhiy Storchaka2015-11-221-21/+15
|\ \ | |/ | | | | Added new tests for Element slice assignments.
| * Issue #19687: Fixed memory leak on failed Element slice assignment.Serhiy Storchaka2015-11-221-21/+15
| | | | | | | | Added new tests for Element slice assignments.