[New-bugs-announce] [issue36543] Remove old-deprecated ElementTree features (part 2)

Serhiy Storchaka report at bugs.python.org
Sat Apr 6 12:06:22 EDT 2019


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

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:

    try:
        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.

----------
assignee: serhiy.storchaka
components: XML
messages: 339533
nosy: eli.bendersky, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Remove old-deprecated ElementTree features (part 2)
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36543>
_______________________________________


More information about the New-bugs-announce mailing list