Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7e0aef0

Browse files
author
Fredrik Lundh
committed
r1068@spiff: Fredrik | 2005-12-12 19:50:30 +0100
assorted xml.etree tweaks
1 parent 075854f commit 7e0aef0

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

Doc/whatsnew/whatsnew25.tex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,12 @@ \section{New, Improved, and Deprecated Modules}
421421
% patch 918101
422422
(Contributed by Lars Gust\"abel.)
423423

424+
\item A new package \module{xml.etree} has been added, which contains
425+
a subset of the ElementTree XML library. Available modules are
426+
\module{ElementTree}, \module{ElementPath}, and
427+
\module{ElementInclude}, from ElementTree 1.2.6. (Contributed by
428+
Fredrik Lundh.)
429+
424430
\item The \module{xmlrpclib} module now supports returning
425431
\class{datetime} objects for the XML-RPC date type. Supply
426432
\code{use_datetime=True} to the \function{loads()} function
@@ -437,6 +443,8 @@ \section{New, Improved, and Deprecated Modules}
437443

438444
% XXX new distutils features: upload
439445

446+
% XXX should hashlib perhaps be described here instead?
447+
% XXX should xml.etree perhaps be described here instead?
440448

441449

442450

Lib/test/xmltests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ def runtest(name):
1515
runtest("test.test_minidom")
1616
runtest("test.test_pyexpat")
1717
runtest("test.test_sax")
18+
runtest("test.test_xml_etree")
1819
runtest("test.test_xmllib")
1920
runtest("test.test_xmlrpc")

Lib/xml/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Core XML support for Python.
22
3-
This package contains three sub-packages:
3+
This package contains four sub-packages:
44
55
dom -- The W3C Document Object Model. This supports DOM Level 1 +
66
Namespaces.
@@ -10,10 +10,14 @@
1010
sax -- The Simple API for XML, developed by XML-Dev, led by David
1111
Megginson and ported to Python by Lars Marius Garshol. This
1212
supports the SAX 2 API.
13+
14+
etree -- The ElementTree XML library. This is a subset of the full
15+
ElementTree XML release.
16+
1317
"""
1418

1519

16-
__all__ = ["dom", "parsers", "sax"]
20+
__all__ = ["dom", "parsers", "sax", "etree"]
1721

1822
# When being checked-out without options, this has the form
1923
# "<dollar>Revision: x.y </dollar>"

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ Extension Modules
292292
Library
293293
-------
294294

295+
- Added a subset of Fredrik Lundh's ElementTree package. Available
296+
modules are xml.etree.ElementTree, xml.etree.ElementPath, and
297+
xml.etree.ElementInclude, from ElementTree 1.2.6.
298+
295299
- Patch #1162825: Support non-ASCII characters in IDLE window titles.
296300

297301
- Bug #1365984: urllib now opens "data:" URLs again.

0 commit comments

Comments
 (0)