summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2018-06-27 07:19:51 -0700
committerGitHub <noreply@github.com>2018-06-27 07:19:51 -0700
commit46750f44e3d59c039fc72a9035b0c9935ecaf992 (patch)
treea15ef488e1f1c73e4135666160d789e58325908b
parent3beeb23ca7b8d105b05559de3f9defd0f70168e0 (diff)
parent86d4146f0debc004b4a8b6aa69df818ef4ad9080 (diff)
downloadmarkupsafe-46750f44e3d59c039fc72a9035b0c9935ecaf992.tar.gz
Merge pull request #98 from The-Compiler/collections
Import Mapping from collections.abc
-rw-r--r--markupsafe/__init__.py4
-rw-r--r--markupsafe/_compat.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/markupsafe/__init__.py b/markupsafe/__init__.py
index 0acf735..0bd6fd2 100644
--- a/markupsafe/__init__.py
+++ b/markupsafe/__init__.py
@@ -9,13 +9,11 @@ special characters with safe representations.
:copyright: © 2010 by the Pallets team.
:license: BSD, see LICENSE for more details.
"""
-from collections import Mapping
-
import re
import string
from markupsafe._compat import (
- PY2, int_types, iteritems, string_types, text_type, unichr
+ PY2, int_types, iteritems, string_types, text_type, unichr, Mapping
)
__version__ = '1.1'
diff --git a/markupsafe/_compat.py b/markupsafe/_compat.py
index 7435faf..4d2e2cd 100644
--- a/markupsafe/_compat.py
+++ b/markupsafe/_compat.py
@@ -16,9 +16,11 @@ if not PY2:
unichr = chr
int_types = (int,)
iteritems = lambda x: iter(x.items())
+ from collections.abc import Mapping
else:
text_type = unicode
string_types = (str, unicode)
unichr = unichr
int_types = (int, long)
iteritems = lambda x: x.iteritems()
+ from collections import Mapping