about summary refs log tree commit diff
path: root/src/etc/htmldocck.py
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-06-08 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-06-08 20:35:56 +0200
commit291dce91b24d70382ebf1116fa836fd91960de84 (patch)
tree54dc428c4077faa10431f9df8c81cfcb2e487d73 /src/etc/htmldocck.py
parent73558160933b2764ed9a84b1b2b647e128eac3f8 (diff)
downloadrust-291dce91b24d70382ebf1116fa836fd91960de84.tar.gz
rust-291dce91b24d70382ebf1116fa836fd91960de84.zip
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.
Diffstat (limited to 'src/etc/htmldocck.py')
-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