diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-24 09:03:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 09:03:34 (GMT) |
commit | 02ec92fa7b1dddc23d479ee0b87dc283793505a8 (patch) | |
tree | 4fc90891da617efbc74239d9dc62eef44f3aa5ff /Doc/library | |
parent | c5734998d91e9953fd179ba6ed7015b6343e8191 (diff) | |
download | cpython-02ec92fa7b1dddc23d479ee0b87dc283793505a8.zip cpython-02ec92fa7b1dddc23d479ee0b87dc283793505a8.tar.gz cpython-02ec92fa7b1dddc23d479ee0b87dc283793505a8.tar.bz2 |
bpo-29209: Remove old-deprecated features in ElementTree. (GH-6769)
Also make getchildren() and getiterator() emitting
a DeprecationWarning instead of PendingDeprecationWarning.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 6298f13..0cb949a 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -772,13 +772,13 @@ Element Objects .. method:: getchildren() - .. deprecated:: 3.2 + .. deprecated-removed:: 3.2 3.9 Use ``list(elem)`` or iteration. .. method:: getiterator(tag=None) - .. deprecated:: 3.2 + .. deprecated-removed:: 3.2 3.9 Use method :meth:`Element.iter` instead. @@ -888,7 +888,7 @@ ElementTree Objects .. method:: getiterator(tag=None) - .. deprecated:: 3.2 + .. deprecated-removed:: 3.2 3.9 Use method :meth:`ElementTree.iter` instead. @@ -1050,20 +1050,20 @@ XMLParser Objects ^^^^^^^^^^^^^^^^^ -.. class:: XMLParser(html=0, target=None, encoding=None) +.. class:: XMLParser(*, target=None, encoding=None) This class is the low-level building block of the module. It uses :mod:`xml.parsers.expat` for efficient, event-based parsing of XML. It can be fed XML data incrementally with the :meth:`feed` method, and parsing events are translated to a push API - by invoking callbacks on the *target* object. If *target* is omitted, the standard :class:`TreeBuilder` is used. - The *html* argument was historically used for backwards compatibility and is - now deprecated. If *encoding* [1]_ is given, the value overrides the + If *encoding* [1]_ is given, the value overrides the encoding specified in the XML file. - .. deprecated:: 3.4 - The *html* argument. The remaining arguments should be passed via - keyword to prepare for the removal of the *html* argument. + .. versionchanged:: 3.8 + Parameters are now :ref:`keyword-only <keyword-only_parameter>`. + The *html* argument no longer supported. + .. method:: close() @@ -1072,13 +1072,6 @@ XMLParser Objects this is the toplevel document element. - .. method:: doctype(name, pubid, system) - - .. deprecated:: 3.2 - Define the :meth:`TreeBuilder.doctype` method on a custom TreeBuilder - target. - - .. method:: feed(data) Feeds data to the parser. *data* is encoded data. |