From 03b22f696c25614e47e003a01c16f617d1c82dd5 Mon Sep 17 00:00:00 2001 From: Rahul Kumaresan Date: Wed, 11 Mar 2020 23:17:18 +0530 Subject: [PATCH 1/5] modify iter() suggestion to Element.iter() In the whatsnew section, under the point which mentions the deprecation of getchildren() and getiterator() through bpo-36543, it is suggested to use iter() instead. Ideally there should be a suggestion to use Element.iter() instead. The commits does the above modification. --- Doc/whatsnew/3.9.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 9948539b01c586..1220cd494b005c 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -600,7 +600,8 @@ Removed * Methods ``getchildren()`` and ``getiterator()`` in the :mod:`~xml.etree.ElementTree` module have been removed. They were - deprecated in Python 3.2. Use functions :func:`list` and :func:`iter` + deprecated in Python 3.2. Use functions :func:`list` and + :meth:`Element.iter()` instead. The ``xml.etree.cElementTree`` module has been removed. (Contributed by Serhiy Storchaka in :issue:`36543`.) From a01411510f2184ce8d9fc05efa0faf9f93c882f9 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2020 18:08:01 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst diff --git a/Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst b/Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst new file mode 100644 index 00000000000000..39348e8db3db35 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst @@ -0,0 +1,3 @@ +In the whatsnew section, under the point which mentions the deprecation of getchildren() and getiterator() through bpo-36543, it is suggested to use iter() instead. + +Ideally there should be a suggestion to use Element.iter() instead. \ No newline at end of file From 7bb96c1dddedb4750a626135fa6f02e35dab44d9 Mon Sep 17 00:00:00 2001 From: Rahul Kumaresan Date: Wed, 11 Mar 2020 23:17:18 +0530 Subject: [PATCH 3/5] modify iter() suggestion to Element.iter() In the whatsnew section, under the point which mentions the deprecation of getchildren() and getiterator() through bpo-36543, it is suggested to use iter() instead. Ideally there should be a suggestion to use Element.iter() instead. The commits does the above modification. --- Doc/whatsnew/3.9.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 9948539b01c586..fd4f75c7ef3bc2 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -600,7 +600,8 @@ Removed * Methods ``getchildren()`` and ``getiterator()`` in the :mod:`~xml.etree.ElementTree` module have been removed. They were - deprecated in Python 3.2. Use functions :func:`list` and :func:`iter` + deprecated in Python 3.2. Use functions :func:`list` and + :meth:`Element.iter()` instead. The ``xml.etree.cElementTree`` module has been removed. (Contributed by Serhiy Storchaka in :issue:`36543`.) From d561b984e88ba5bb6cdcba7aeccfbfc50e87607d Mon Sep 17 00:00:00 2001 From: Rahul Kumaresan Date: Thu, 12 Mar 2020 00:12:36 +0530 Subject: [PATCH 4/5] remove blurb-it news entry --- .../Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst diff --git a/Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst b/Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst deleted file mode 100644 index 39348e8db3db35..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2020-03-11-18-08-00.bpo-39937.3tf0xl.rst +++ /dev/null @@ -1,3 +0,0 @@ -In the whatsnew section, under the point which mentions the deprecation of getchildren() and getiterator() through bpo-36543, it is suggested to use iter() instead. - -Ideally there should be a suggestion to use Element.iter() instead. \ No newline at end of file From e5dffdcc0dabb2943a25f400e388d628a851784f Mon Sep 17 00:00:00 2001 From: Rahul Kumaresan Date: Fri, 13 Mar 2020 22:26:06 +0530 Subject: [PATCH 5/5] add elaborate removal declaration --- Doc/whatsnew/3.9.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index fd4f75c7ef3bc2..0bcf8672837c8b 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -598,11 +598,13 @@ Removed Use :meth:`~threading.Thread.is_alive()` instead. (Contributed by Dong-hee Na in :issue:`37804`.) -* Methods ``getchildren()`` and ``getiterator()`` in the - :mod:`~xml.etree.ElementTree` module have been removed. They were - deprecated in Python 3.2. Use functions :func:`list` and - :meth:`Element.iter()` - instead. The ``xml.etree.cElementTree`` module has been removed. +* Methods ``getchildren()`` and ``getiterator()`` of classes + :class:`~xml.etree.ElementTree.ElementTree` and + :class:`~xml.etree.ElementTree.Element` in the :mod:`~xml.etree.ElementTree` + module have been removed. They were deprecated in Python 3.2. + Use ``iter(x)`` or ``list(x)`` instead of ``x.getchildren()`` and + ``x.iter()`` or ``list(x.iter())`` instead of ``x.getiterator()``. + The ``xml.etree.cElementTree`` module has been removed. (Contributed by Serhiy Storchaka in :issue:`36543`.) * The old :mod:`plistlib` API has been removed, it was deprecated since Python