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.
15 years ago
Eli Bendersky
f996e775ea
Closes Issue #14246 : _elementtree parser will now handle io.StringIO
15 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
15 years ago
Florent Xicluna
50eee834fd
Issue #14007 : drop unused TreeBuilder().xml.
15 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.
15 years ago
Florent Xicluna
a72a98f24a
Issue #13988 : cElementTree is deprecated and the _elementtree accelerator is automatically used whenever available.
15 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.
15 years ago
Serhiy Storchaka
191321d11b
Issue #20440 : More use of Py_SETREF.
This patch is manually crafted and contains changes that couldn't be handled
automatically.
11 years ago
Serhiy Storchaka
bc4ded9537
Issue #24103 : Fixed possible use after free in ElementTree.XMLPullParser.
11 years ago
Serhiy Storchaka
66c08d90f6
Issue #25902 : Fixed various refcount issues in ElementTree iteration.
11 years ago
Serhiy Storchaka
5c4064e8bd
Issue #25421 : __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
11 years ago
Serhiy Storchaka
a29eb08fb9
Fixed possible leaks in ElementTree parser.
11 years ago
Serhiy Storchaka
d6a69d8ccb
Fixed possible leak in ElementTree.Element.iter().
11 years ago
Larry Hastings
dbfdc380df
Issue #24001 : Argument Clinic converters now use accept={type}
instead of types={'type'} to specify the types the converter accepts.
11 years ago
Serhiy Storchaka
cb98556373
Issue #20159 . Converted the _elementtree module to Argument Clinic.
11 years ago
Serhiy Storchaka
26861b0b29
Issue #23450 : Fixed possible integer overflows.
12 years ago
Victor Stinner
706768c687
Issue #22156 : Fix some "comparison between signed and unsigned integers"
compiler warnings in the Modules/ subdirectory.
12 years ago
Florent Xicluna
0965ee213e
Issue #2892 : preserve iterparse events in case of SyntaxError
15 years ago
Florent Xicluna
91d5193b3a
Closes #2892 : preserve iterparse events in case of SyntaxError.
15 years ago
Florent Xicluna
67d5d0ed44
Closes #7334 : close source files on ElementTree.parse and iterparse (partial backport of issue #10093 from 3.2).
15 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
15 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.
15 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
15 years ago
Victor Stinner
499dfcf29d
Issue #10833 : Use PyUnicode_FromFormat() and PyErr_Format() instead of
PyOS_snprintf().
16 years ago
Victor Stinner
bfc7bf06a6
_elementtree.c: remove trailing spaces
16 years ago
Alexander Belopolsky
e239d23e8c
Issue #6697 : Fixed instances of _PyUnicode_AsString() result not checked for NULL
16 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
16 years ago
Antoine Pitrou
e033e06db0
Issue #10093 : ResourceWarnings are now issued when files and sockets are
deallocated without explicit closing. These warnings are silenced by
default, except in pydebug mode.
16 years ago
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
va_copy, but available on all python platforms. Untabified a few
unrelated files.
16 years ago
Larry Hastings
402b73fb8d
Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
17 years ago
Victor Stinner
0477bf3a93
Fix a crash in _elementtree related to lone unicode surrogates.
Fix a segfault on:
>>> import _elementtree
>>> _elementtree.iterparse('/bin/sh', ("\uDC80", "\ud808\udf45"))
17 years ago
Florent Xicluna
f15351d938
Merged revisions 78838-78839,78917,78919,78934,78937 via svnmerge from
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.
........
17 years ago
Florent Xicluna
e2e81e8fcd
Fix repr of tree Element on windows.
17 years ago
Florent Xicluna
3e8c189faa
Issue #6472 : The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too.
17 years ago