From 291dce91b24d70382ebf1116fa836fd91960de84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Mon, 8 Jun 2020 00:00:00 +0000 Subject: [PATCH] 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. --- src/etc/htmldocck.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index 7789b24b62c83..2e7958325cd61 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -114,7 +114,10 @@ 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