summaryrefslogtreecommitdiff
path: root/dev-python/html5lib
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-04-04 21:00:13 +0200
committerMichał Górny <mgorny@gentoo.org>2020-04-04 21:06:32 +0200
commitab9ade98f4508946e4f9dc0acab4ded74c2362c4 (patch)
tree7c72d0d8131b3bb619974199e8bf17dbe7d6a6e4 /dev-python/html5lib
parente6c0948f96834bee0fcb16d0dfc1fd1857914d9a (diff)
downloadgentoo-ab9ade98f4508946e4f9dc0acab4ded74c2362c4.tar.gz
gentoo-ab9ade98f4508946e4f9dc0acab4ded74c2362c4.tar.bz2
gentoo-ab9ade98f4508946e4f9dc0acab4ded74c2362c4.zip
dev-python/html5lib: Commit missing patch
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/html5lib')
-rw-r--r--dev-python/html5lib/files/html5lib-1.0.1-collections-abc.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-python/html5lib/files/html5lib-1.0.1-collections-abc.patch b/dev-python/html5lib/files/html5lib-1.0.1-collections-abc.patch
new file mode 100644
index 000000000000..d5a9dcac299d
--- /dev/null
+++ b/dev-python/html5lib/files/html5lib-1.0.1-collections-abc.patch
@@ -0,0 +1,44 @@
+From 4f9235752cea29c5a31721440578b430823a1e69 Mon Sep 17 00:00:00 2001
+From: 5j9 <5j9@users.noreply.github.com>
+Date: Mon, 1 Oct 2018 15:02:33 +0330
+Subject: [PATCH] Try to import MutableMapping from collections.abc (#403)
+
+Note that collections.abc has been added in Python 3.3.
+
+Fixes #402
+---
+ html5lib/_trie/_base.py | 5 ++++-
+ html5lib/treebuilders/dom.py | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/html5lib/_trie/_base.py b/html5lib/_trie/_base.py
+index a1158bbb..6b71975f 100644
+--- a/html5lib/_trie/_base.py
++++ b/html5lib/_trie/_base.py
+@@ -1,6 +1,9 @@
+ from __future__ import absolute_import, division, unicode_literals
+
+-from collections import Mapping
++try:
++ from collections.abc import Mapping
++except ImportError: # Python 2.7
++ from collections import Mapping
+
+
+ class Trie(Mapping):
+diff --git a/html5lib/treebuilders/dom.py b/html5lib/treebuilders/dom.py
+index dcfac220..d8b53004 100644
+--- a/html5lib/treebuilders/dom.py
++++ b/html5lib/treebuilders/dom.py
+@@ -1,7 +1,10 @@
+ from __future__ import absolute_import, division, unicode_literals
+
+
+-from collections import MutableMapping
++try:
++ from collections.abc import MutableMapping
++except ImportError: # Python 2.7
++ from collections import MutableMapping
+ from xml.dom import minidom, Node
+ import weakref
+