about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-03 17:16:50 -0700
committerGitHub <noreply@github.com>2020-07-03 17:16:50 -0700
commitdf8f551e796e3dd86a1ea8fb23b96cefbc7cdf85 (patch)
tree50911da54c48eddf3c39112ff954f2d2ccaa98ee
parentf844ea1e561475e6023282ef167e76bc973773ef (diff)
parent291dce91b24d70382ebf1116fa836fd91960de84 (diff)
downloadrust-df8f551e796e3dd86a1ea8fb23b96cefbc7cdf85.tar.gz
rust-df8f551e796e3dd86a1ea8fb23b96cefbc7cdf85.zip
Rollup merge of #73140 - tmiasko:element-tree, r=GuillaumeGomez
Fallback to xml.etree.ElementTree

The xml.etree.cElementTree has been deprecated since Python 3.3
and removed in Python 3.9 https://bugs.python.org/issue36543.
-rw-r--r--src/etc/htmldocck.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py
index 7789b24b62c..2e7958325cd 100644
--- a/src/etc/htmldocck.py
+++ b/src/etc/htmldocck.py
@@ -114,7 +114,10 @@ try:
     from html.parser import HTMLParser
 except ImportError:
     from HTMLParser import HTMLParser
-from xml.etree import cElementTree as ET
+try:
+    from xml.etree import cElementTree as ET
+except ImportError:
+    from xml.etree import ElementTree as ET
 
 try:
     from html.entities import name2codepoint