summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-09-01 08:18:35 (GMT)
committerGitHub <noreply@github.com>2019-09-01 08:18:35 (GMT)
commitf02ea6225bc3b71bd5fe66224d199a6e3e23b14d (patch)
treeffd4a17d92f18ad031f5aa221d67876ffe8e8865 /Modules/_elementtree.c
parentc5b242f87f31286ad38991bc3868cf4cfbf2b681 (diff)
downloadcpython-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 'Modules/_elementtree.c')
-rw-r--r--Modules/_elementtree.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 830ce86..b88e8a1 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -1426,42 +1426,6 @@ _elementtree_Element_get_impl(ElementObject *self, PyObject *key,
return value;
}
-/*[clinic input]
-_elementtree.Element.getchildren
-
-[clinic start generated code]*/
-
-static PyObject *
-_elementtree_Element_getchildren_impl(ElementObject *self)
-/*[clinic end generated code: output=e50ffe118637b14f input=0f754dfded150d5f]*/
-{
- Py_ssize_t i;
- PyObject* list;
-
- if (PyErr_WarnEx(PyExc_DeprecationWarning,
- "This method will be removed in future versions. "
- "Use 'list(elem)' or iteration over elem instead.",
- 1) < 0) {
- return NULL;
- }
-
- if (!self->extra)
- return PyList_New(0);
-
- list = PyList_New(self->extra->length);
- if (!list)
- return NULL;
-
- for (i = 0; i < self->extra->length; i++) {
- PyObject* item = self->extra->children[i];
- Py_INCREF(item);
- PyList_SET_ITEM(list, i, item);
- }
-
- return list;
-}
-
-
static PyObject *
create_elementiter(ElementObject *self, PyObject *tag, int gettext);
@@ -1493,27 +1457,6 @@ _elementtree_Element_iter_impl(ElementObject *self, PyObject *tag)
/*[clinic input]
-_elementtree.Element.getiterator
-
- tag: object = None
-
-[clinic start generated code]*/
-
-static PyObject *
-_elementtree_Element_getiterator_impl(ElementObject *self, PyObject *tag)
-/*[clinic end generated code: output=cb69ff4a3742dfa1 input=500da1a03f7b9e28]*/
-{
- if (PyErr_WarnEx(PyExc_DeprecationWarning,
- "This method will be removed in future versions. "
- "Use 'tree.iter()' or 'list(tree.iter())' instead.",
- 1) < 0) {
- return NULL;
- }
- return _elementtree_Element_iter_impl(self, tag);
-}
-
-
-/*[clinic input]
_elementtree.Element.itertext
[clinic start generated code]*/
@@ -4220,9 +4163,6 @@ static PyMethodDef element_methods[] = {
_ELEMENTTREE_ELEMENT_ITERTEXT_METHODDEF
_ELEMENTTREE_ELEMENT_ITERFIND_METHODDEF
- _ELEMENTTREE_ELEMENT_GETITERATOR_METHODDEF
- _ELEMENTTREE_ELEMENT_GETCHILDREN_METHODDEF
-
_ELEMENTTREE_ELEMENT_ITEMS_METHODDEF
_ELEMENTTREE_ELEMENT_KEYS_METHODDEF