diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-09-01 08:18:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-01 08:18:35 (GMT) |
commit | f02ea6225bc3b71bd5fe66224d199a6e3e23b14d (patch) | |
tree | ffd4a17d92f18ad031f5aa221d67876ffe8e8865 /Lib/xml | |
parent | c5b242f87f31286ad38991bc3868cf4cfbf2b681 (diff) | |
download | cpython-f02ea6225bc3b71bd5fe66224d199a6e3e23b14d.zip cpython-f02ea6225bc3b71bd5fe66224d199a6e3e23b14d.tar.gz cpython-f02ea6225bc3b71bd5fe66224d199a6e3e23b14d.tar.bz2 |
bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)
Remove methods Element.getchildren(), Element.getiterator() and
ElementTree.getiterator() and the xml.etree.cElementTree module.
Diffstat (limited to 'Lib/xml')
-rw-r--r-- | Lib/xml/etree/ElementTree.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py index 431ecd0..beb2d68 100644 --- a/Lib/xml/etree/ElementTree.py +++ b/Lib/xml/etree/ElementTree.py @@ -273,19 +273,6 @@ class Element: # assert iselement(element) self._children.remove(subelement) - def getchildren(self): - """(Deprecated) Return all subelements. - - Elements are returned in document order. - - """ - warnings.warn( - "This method will be removed in future versions. " - "Use 'list(elem)' or iteration over elem instead.", - DeprecationWarning, stacklevel=2 - ) - return self._children - def find(self, path, namespaces=None): """Find first matching element by tag name or path. @@ -409,15 +396,6 @@ class Element: for e in self._children: yield from e.iter(tag) - # compatibility - def getiterator(self, tag=None): - warnings.warn( - "This method will be removed in future versions. " - "Use 'elem.iter()' or 'list(elem.iter())' instead.", - DeprecationWarning, stacklevel=2 - ) - return list(self.iter(tag)) - def itertext(self): """Create text iterator. @@ -617,15 +595,6 @@ class ElementTree: # assert self._root is not None return self._root.iter(tag) - # compatibility - def getiterator(self, tag=None): - warnings.warn( - "This method will be removed in future versions. " - "Use 'tree.iter()' or 'list(tree.iter())' instead.", - DeprecationWarning, stacklevel=2 - ) - return list(self.iter(tag)) - def find(self, path, namespaces=None): """Find first matching element by tag name or path. |