Title: Remove old-deprecated ElementTree features (part 2)
Type: enhancement Stage: resolved
Components: XML Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: eli.bendersky, scoder, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-04-06 16:06 by serhiy.storchaka, last changed 2019-09-01 08:19 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12707 merged serhiy.storchaka, 2019-04-06 16:13
Messages (3)
msg339533 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-06 16:06
The proposed PR removes old-deprecated ElementTree features.

* Methods Element.getchildren(), Element.getiterator() and ElementTree.getiterator() deprecated in 2.7 and 3.2. They were deprecated in the documentation only, and started to emit a warning in 3.8. Use list(elem) or iteration instead of getchildren(), methods iter() instead of getiterator().

* The xml.etree.cElementTree module deprecated in 3.3. It was deprecated documentation only because adding a runtime warning will cause more harm than removing it because of the common idiom of using it since Python 2:

        import xml.etree.cElementTree as ET
    except ImportError:
        import xml.etree.ElementTree as ET

TODO: Add a What's New entry after the start of developing 3.9.
msg339535 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-06 16:16
See also issue29209.
msg350938 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-01 08:18
New changeset f02ea6225bc3b71bd5fe66224d199a6e3e23b14d by Serhiy Storchaka in branch 'master':
bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)
Date User Action Args
2019-09-01 08:19:14serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-09-01 08:18:43serhiy.storchakasetmessages: + msg350938
2019-04-06 16:16:22serhiy.storchakasetmessages: + msg339535
2019-04-06 16:13:29serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request12631
2019-04-06 16:06:22serhiy.storchakacreate