Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f92357

Browse files
5j9gsnedders
authored andcommitted
Try to import MutableMapping from collections.abc (html5lib#403)
Note that collections.abc has been added in Python 3.3.Fixeshtml5lib#402
1 parent0ba6628 commit4f92357

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎html5lib/_trie/_base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from __future__importabsolute_import,division,unicode_literals
22

3-
fromcollectionsimportMapping
3+
try:
4+
fromcollections.abcimportMapping
5+
exceptImportError:# Python 2.7
6+
fromcollectionsimportMapping
47

58

69
classTrie(Mapping):

‎html5lib/treebuilders/dom.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from __future__importabsolute_import,division,unicode_literals
22

33

4-
fromcollectionsimportMutableMapping
4+
try:
5+
fromcollections.abcimportMutableMapping
6+
exceptImportError:# Python 2.7
7+
fromcollectionsimportMutableMapping
58
fromxml.domimportminidom,Node
69
importweakref
710

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp