Botocore: xml.etree.cElementTree removed from Python 3.9

Created on 25 Mar 2020  路  5Comments  路  Source: boto/botocore

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

enhancement

Most helpful comment

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:

All 5 comments

@freddrake - Thank you for your post. Python 3.9 won鈥檛 get offically released till October: https://www.python.org/dev/peps/pep-0596/#schedule. But we will need to update the botocore code to not use that interface before that happens. Marking this as enhancement.

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:

Hitting this in Fedora's 3.9 prep as well: https://bugzilla.redhat.com/show_bug.cgi?id=1818594

@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

I've run my change-set in the linked PR against
Python 3.9.0a5+ (heads/master:a25a04fea5, Apr 20 2020, 22:35:10)
and all good!

TOTAL                                                       10653    448    96%
----------------------------------------------------------------------
Ran 6977 tests in 466.608s

OK
___________________________________summary_____________________________________
  py39: commands succeeded
  congratulations :)

Was this page helpful?
0 / 5 - 0 ratings