1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

update html5lib vendoring patch

This commit is contained in:
Christian Heimes 2020-05-21 18:49:22 +02:00
parent 4333333d13
commit 3ed33bd3a1

View file

@ -28,4 +28,28 @@ index dcfac220..d8b53004 100644
+ from collections import MutableMapping
from xml.dom import minidom, Node
import weakref
diff --git a/src/pip/_vendor/html5lib/_utils.py b/src/pip/_vendor/html5lib/_utils.py
index 0703afb3..96eb17b2 100644
--- a/src/pip/_vendor/html5lib/_utils.py
+++ b/src/pip/_vendor/html5lib/_utils.py
@@ -2,12 +2,15 @@ from __future__ import absolute_import, division, unicode_literals
from types import ModuleType
-from pip._vendor.six import text_type
+from pip._vendor.six import text_type, PY3
-try:
- import xml.etree.cElementTree as default_etree
-except ImportError:
+if PY3:
import xml.etree.ElementTree as default_etree
+else:
+ try:
+ import xml.etree.cElementTree as default_etree
+ except ImportError:
+ import xml.etree.ElementTree as default_etree
__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair",