question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

xml.etree.cElementTree removed from Python 3.9

See original GitHub issue

With newer versions of Python, xml.etree.ElementTree should be used directly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
freddrakecommented, Mar 27, 2020

Right. For people trying to make sure their applications are prepared, it’s important that dependencies are compatible. It’s not urgent, because there’s still plenty of time in the schedule, but the sooner dependencies are ready, the better it is for everyone.

For the record, finding this issue also triggered a couple of (small-ish) bugs reported against Python:

2reactions
StevenMapescommented, Apr 8, 2020

@swetashre All you need to do, for now, is and it should keep working in Python 3.9

try:
    import xml.etree.cElementTree
except ImportError:
    import xml.etree.ElementTree as cElementTree
Read more comments on GitHub >

github_iconTop Results From Across the Web

xml.etree.ElementTree — The ElementTree XML API ...
Creates a new element object of the same type as this element. Do not call this method, use the SubElement() factory function instead....
Read more >
How to remove a node inside an iterator in python xml.etree ...
You can't remove nodes without knowing the parent, but the xml.etree package doesn't give you any way to access a parent from a...
Read more >
elementtree.getchildren function is removed in Python 3.9 #1162
getchildren() Deprecated since version 3.2, will be removed in version 3.9: Use list(elem) or iteration.
Read more >
T213814 xml.etree.ElementTree.Element.getchildren() has ...
xml.etree.ElementTree.Element.getchildren() and getiterator() is deprecated since python 2.7 and 3.2 and has been removed in python 3.9.
Read more >
Processing XML in Python — ElementTree | by Deepesh Nair
As a data scientist, you'll find that understanding XML is… ... modify and populate XML files with the Python ElementTree package, ... import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found