Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Mapping from collections.abc #98

Merged
merged 1 commit into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions markupsafe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
: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'
Expand Down
2 changes: 2 additions & 0 deletions markupsafe/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
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