File tree Expand file tree Collapse file tree 4 files changed +40
-2
lines changed
Expand file tree Collapse file tree 4 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 1+ Make vendored html5lib compatible with Python 3.9.
Original file line number Diff line number Diff line change 11from __future__ import absolute_import , division , unicode_literals
22
3- from collections import Mapping
3+ try :
4+ from collections .abc import Mapping
5+ except ImportError : # Python 2.7
6+ from collections import Mapping
47
58
69class Trie (Mapping ):
Original file line number Diff line number Diff line change 11from __future__ import absolute_import , division , unicode_literals
22
33
4- from collections import MutableMapping
4+ try :
5+ from collections .abc import MutableMapping
6+ except ImportError : # Python 2.7
7+ from collections import MutableMapping
58from xml .dom import minidom , Node
69import weakref
710
Original file line number Diff line number Diff line change 1+ diff --git a/src/pip/_vendor/html5lib/_trie/_base.py b/src/pip/_vendor/html5lib/_trie/_base.py
2+ index a1158bbb..6b71975f 100644
3+ --- a/src/pip/_vendor/html5lib/_trie/_base.py
4+ +++ b/src/pip/_vendor/html5lib/_trie/_base.py
5+ @@ -1,6 +1,9 @@
6+ from __future__ import absolute_import, division, unicode_literals
7+
8+ - from collections import Mapping
9+ + try:
10+ + from collections.abc import Mapping
11+ + except ImportError: # Python 2.7
12+ + from collections import Mapping
13+
14+
15+ class Trie(Mapping):
16+ diff --git a/src/pip/_vendor/html5lib/treebuilders/dom.py b/src/pip/_vendor/html5lib/treebuilders/dom.py
17+ index dcfac220..d8b53004 100644
18+ --- a/src/pip/_vendor/html5lib/treebuilders/dom.py
19+ +++ b/src/pip/_vendor/html5lib/treebuilders/dom.py
20+ @@ -1,7 +1,10 @@
21+ from __future__ import absolute_import, division, unicode_literals
22+
23+
24+ - from collections import MutableMapping
25+ + try:
26+ + from collections.abc import MutableMapping
27+ + except ImportError: # Python 2.7
28+ + from collections import MutableMapping
29+ from xml.dom import minidom, Node
30+ import weakref
31+
You can’t perform that action at this time.
0 commit comments