diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-03 17:16:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-03 17:16:50 -0700 |
| commit | df8f551e796e3dd86a1ea8fb23b96cefbc7cdf85 (patch) | |
| tree | 50911da54c48eddf3c39112ff954f2d2ccaa98ee | |
| parent | f844ea1e561475e6023282ef167e76bc973773ef (diff) | |
| parent | 291dce91b24d70382ebf1116fa836fd91960de84 (diff) | |
| download | rust-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.py | 5 |
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 |
