summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* | Issue #14007: make TreeBuilder an actual type exposed from _elementtree, and ↵Eli Bendersky2012-05-291-74/+77
| | | | | | | | subclassable.
* | Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.Eli Bendersky2012-05-291-21/+84
| | | | | | | | | | Add attrib keyword to Element and SubElement in _elementtree. Patch developed with Ezio Melotti.
* | Issue #14849: setup Element data members to be assignable in subclassesEli Bendersky2012-05-201-13/+12
| |
* | Replace bootstrap imports with real C API calls.Eli Bendersky2012-04-051-8/+9
| |
* | Fix Windows compilation errorsEli Bendersky2012-04-041-2/+4
| |
* | Fixes and enhancements to _elementtree:Eli Bendersky2012-04-031-21/+44
| | | | | | | | | | | | * Fixed refleak problems when GC collection is run (see messages in issue #14065) * Added weakref support to Element objects
* | Issue #14065: Added cyclic GC support to ET.ElementEli Bendersky2012-03-301-15/+48
| |
* | Issue #13782: streamline argument type-checking in ET.ElementEli Bendersky2012-03-231-0/+9
| | | | | | | | | | | | | | | | 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
* | Issue #14207: the ParseError exception raised by _elementtree was madeEli Bendersky2012-03-161-8/+27
| | | | | | | | | | | | | | | | | | | | 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.
* | Closes Issue #14246: _elementtree parser will now handle io.StringIOEli Bendersky2012-03-161-1/+22
| |
* | Issue #14178: Problem deleting slices with steps != +1 in the _elementtree ↵Eli Bendersky2012-03-091-3/+67
| | | | | | | | | | | | module. Fixed the problem and added some tests. Closes #14178
* | Issue #14007: drop unused TreeBuilder().xml.Florent Xicluna2012-03-051-23/+0
| |
* | Issue #14128: Exposing Element as an actual type from _elementtree, rather ↵Eli Bendersky2012-03-041-82/+145
| | | | | | | | | | | | | | | | 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.
* | Issue #13988: cElementTree is deprecated and the _elementtree accelerator is ↵Florent Xicluna2012-02-131-3/+3
| | | | | | | | automatically used whenever available.
* | Issue #13988: move the python bootstrap code to cElementTree.py, and remove ↵Florent Xicluna2012-02-111-232/+2
| | | | | | | | obsolete code for Python 2.4 and 2.5.
* | Merge 3.2: issue #2892Florent Xicluna2011-11-011-15/+23
|\ \ | |/
| * Closes #2892: preserve iterparse events in case of SyntaxError.Florent Xicluna2011-11-011-15/+23
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-4/+4
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-13/+20
| | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | Implement PEP 393.Martin v. Löwis2011-09-281-11/+18
| |
* | Issue #10833: Use PyUnicode_FromFormat() and PyErr_Format() instead ofVictor Stinner2011-03-211-5/+7
| | | | | | | | PyOS_snprintf().
* | _elementtree.c: remove trailing spacesVictor Stinner2011-03-211-19/+19
|/
* Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for ↵Alexander Belopolsky2010-12-081-24/+23
| | | | NULL
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-2/+2
|
* Issue #10093: ResourceWarnings are now issued when files and sockets areAntoine Pitrou2010-10-291-11/+21
| | | | | deallocated without explicit closing. These warnings are silenced by default, except in pydebug mode.
* Issue #2443: Added a new macro, Py_VA_COPY, which is equivalent to C99Alexander Belopolsky2010-08-111-14/+14
| | | | | va_copy, but available on all python platforms. Untabified a few unrelated files.
* Fix a crash in _elementtree related to lone unicode surrogates.Victor Stinner2010-03-221-0/+2
| | | | | | | Fix a segfault on: >>> import _elementtree >>> _elementtree.iterparse('/bin/sh', ("\uDC80", "\ud808\udf45"))
* Merged revisions 78838-78839,78917,78919,78934,78937 via svnmerge fromFlorent Xicluna2010-03-131-255/+540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* add a replacement API for PyCObject, PyCapsule #5630Benjamin Peterson2009-05-051-1/+1
| | | | | | All stdlib modules with C-APIs now use this. Patch by Larry Hastings
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-3/+3
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Issue #1717, stage 2: remove uses of tp_compare in Modules and mostMark Dickinson2009-02-011-4/+5
| | | | Objects.
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-2/+2
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* #3247: Get rid of Py_FindMethod:Amaury Forgeot d'Arc2008-07-021-30/+82
| | | | | | | Second step: keep tp_getattr functions when they are complex, but use PyObject_GenericGetAttr() as a fallback. These were the last occurrences of Py_FindMethod.
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-4/+24
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-21/+21
|
* Merged revisions 59985-60000,60002,60005-60007,60009-60042 via svnmerge fromChristian Heimes2008-01-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r59987 | raymond.hettinger | 2008-01-15 21:52:42 +0100 (Tue, 15 Jan 2008) | 1 line Refactor if/elif chain for clarity and speed. Remove dependency on subclasses having to implement _empty and _full. ........ r59988 | raymond.hettinger | 2008-01-15 22:22:47 +0100 (Tue, 15 Jan 2008) | 1 line Fix-up half-written paragraph in the docs ........ r59989 | amaury.forgeotdarc | 2008-01-15 22:25:11 +0100 (Tue, 15 Jan 2008) | 3 lines test_doctest fails since r59984. Not sure if these are the correct values, but save_stdout has to be set before its usage... ........ r59992 | andrew.kuchling | 2008-01-16 01:32:03 +0100 (Wed, 16 Jan 2008) | 1 line Docstring typos ........ r59993 | andrew.kuchling | 2008-01-16 04:17:25 +0100 (Wed, 16 Jan 2008) | 1 line Add PEP 3141 section ........ r59998 | andrew.kuchling | 2008-01-16 14:01:51 +0100 (Wed, 16 Jan 2008) | 1 line Markup fix ........ r59999 | georg.brandl | 2008-01-16 17:56:29 +0100 (Wed, 16 Jan 2008) | 2 lines Fix MSDN library URL. (#1854) ........ r60006 | georg.brandl | 2008-01-16 21:27:56 +0100 (Wed, 16 Jan 2008) | 3 lines Add Python-specific content to Doc dir. Update configuration file to work with the newest Sphinx. ........ r60007 | georg.brandl | 2008-01-16 21:29:00 +0100 (Wed, 16 Jan 2008) | 2 lines Doc build should work with 2.4 now. ........ r60009 | raymond.hettinger | 2008-01-17 00:38:16 +0100 (Thu, 17 Jan 2008) | 1 line Minor wordsmithing. ........ r60010 | raymond.hettinger | 2008-01-17 00:40:45 +0100 (Thu, 17 Jan 2008) | 1 line Add queues will alternative fetch orders (priority based and stack based). ........ r60011 | raymond.hettinger | 2008-01-17 00:49:35 +0100 (Thu, 17 Jan 2008) | 1 line Add news entry. ........ r60013 | raymond.hettinger | 2008-01-17 04:02:14 +0100 (Thu, 17 Jan 2008) | 1 line Make starmap() match its pure python definition and accept any itertable input (not just tuples). ........ r60015 | gregory.p.smith | 2008-01-17 08:43:20 +0100 (Thu, 17 Jan 2008) | 3 lines Comply with RFC 3207. Fixes issue 829951 - http://bugs.python.org/issue829951 ........ r60018 | gregory.p.smith | 2008-01-17 09:03:17 +0100 (Thu, 17 Jan 2008) | 2 lines entry for r60015 ........ r60019 | raymond.hettinger | 2008-01-17 09:07:05 +0100 (Thu, 17 Jan 2008) | 1 line Note versionadded. ........ r60020 | gregory.p.smith | 2008-01-17 09:35:49 +0100 (Thu, 17 Jan 2008) | 8 lines Fixes (accepts patch) issue1339 - http://bugs.python.org/issue1339 - Factor out the duplication of EHLO/HELO in login() and sendmail() to a new function, ehlo_or_helo_if_needed(). - Use ehlo_or_helo_if_needed() in starttls() - Check for the starttls exception in starttls() in the same way as login() checks for the auth extension. Contributed by Bill Fenner. ........ r60021 | andrew.kuchling | 2008-01-17 13:00:15 +0100 (Thu, 17 Jan 2008) | 1 line Revise 3141 section a bit; add some Windows items ........ r60022 | brett.cannon | 2008-01-17 19:45:10 +0100 (Thu, 17 Jan 2008) | 2 lines Fix a function pointer declaration to silence the compiler. ........ r60024 | raymond.hettinger | 2008-01-17 20:31:38 +0100 (Thu, 17 Jan 2008) | 1 line Issue #1861: Add read-only attribute listing upcoming events in the order they will be run. ........ r60025 | andrew.kuchling | 2008-01-17 20:49:24 +0100 (Thu, 17 Jan 2008) | 1 line Correction from Jordan Lewis: halfdelay() uses tenths of a second, not milliseconds ........ r60026 | raymond.hettinger | 2008-01-17 23:27:49 +0100 (Thu, 17 Jan 2008) | 1 line Add advice on choosing between scheduler and threading.Timer(). ........ r60028 | christian.heimes | 2008-01-18 00:01:44 +0100 (Fri, 18 Jan 2008) | 2 lines Updated new property syntax. An elaborate example for subclassing and the getter was missing. Added comment about VS 2008 and PGO builds. ........ r60029 | raymond.hettinger | 2008-01-18 00:32:01 +0100 (Fri, 18 Jan 2008) | 1 line Fix-up Timer() example. ........ r60030 | raymond.hettinger | 2008-01-18 00:56:56 +0100 (Fri, 18 Jan 2008) | 1 line Fix markup ........ r60031 | raymond.hettinger | 2008-01-18 01:10:42 +0100 (Fri, 18 Jan 2008) | 1 line clearcache() needs to remove the dict as well as clear it. ........ r60033 | andrew.kuchling | 2008-01-18 03:26:16 +0100 (Fri, 18 Jan 2008) | 1 line Bump verson ........ r60034 | andrew.kuchling | 2008-01-18 03:42:52 +0100 (Fri, 18 Jan 2008) | 1 line Typo fix ........ r60035 | christian.heimes | 2008-01-18 08:30:20 +0100 (Fri, 18 Jan 2008) | 3 lines Coverity issue CID #197 var_decl: Declared variable "stm" without initializer ninit_use_in_call: Using uninitialized value "stm" (field "stm".tm_zone uninitialized) in call to function "mktime" ........ r60036 | christian.heimes | 2008-01-18 08:45:30 +0100 (Fri, 18 Jan 2008) | 11 lines Coverity issue CID #167 Event alloc_fn: Called allocation function "metacompile" [model] Event var_assign: Assigned variable "gr" to storage returned from "metacompile" gr = metacompile(n); Event pass_arg: Variable "gr" not freed or pointed-to in function "maketables" [model] g = maketables(gr); translatelabels(g); addfirstsets(g); Event leaked_storage: Returned without freeing storage "gr" return g; ........ r60038 | christian.heimes | 2008-01-18 09:04:57 +0100 (Fri, 18 Jan 2008) | 3 lines Coverity issue CID #182 size_error: Allocating 1 bytes to pointer "children", which needs at least 4 bytes ........ r60041 | christian.heimes | 2008-01-18 09:47:59 +0100 (Fri, 18 Jan 2008) | 4 lines Coverity issue CID #169 local_ptr_assign_local: Assigning address of stack variable "namebuf" to pointer "filename" out_of_scope: Variable "namebuf" goes out of scope use_invalid: Used "filename" pointing to out-of-scope variable "namebuf" ........ r60042 | christian.heimes | 2008-01-18 09:53:45 +0100 (Fri, 18 Jan 2008) | 2 lines Coverity CID #168 leaked_storage: Returned without freeing storage "fp" ........