Skip to content

Commit

Permalink
Import Mapping from collections.abc on Python 3 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser authored Jan 1, 2019
1 parent e149833 commit 36dcc0f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.6.1

- **FIX**: Fix warning about not importing `Mapping` from `collections.abc`.

## 1.6.0

- **NEW**: Add `closest` method to the API that matches closest ancestor.
Expand Down
2 changes: 1 addition & 1 deletion soupsieve/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,5 @@ def parse_version(ver, pre=False):
return Version(major, minor, micro, release, pre, post, dev)


__version_info__ = Version(1, 6, 0, "final")
__version_info__ = Version(1, 6, 1, ".dev")
__version__ = __version_info__._get_canonical()
3 changes: 1 addition & 2 deletions soupsieve/css_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""CSS selector structure items."""
from __future__ import unicode_literals
from collections import Mapping
from . import util

__all__ = ('Selector', 'SelectorTag', 'SelectorAttribute', 'SelectorNth', 'SelectorList', 'Namespaces')
Expand Down Expand Up @@ -72,7 +71,7 @@ def __repr__(self): # pragma: no cover
__str__ = __repr__


class ImmutableDict(Mapping):
class ImmutableDict(util.Mapping):
"""Hashable, immutable dictionary."""

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions soupsieve/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if PY3:
from functools import lru_cache # noqa F401
import copyreg # noqa F401
from collections.abc import Hashable # noqa F401
from collections.abc import Hashable, Mapping # noqa F401

ustr = str # noqa
bstr = bytes # noqa
Expand All @@ -19,7 +19,7 @@
else:
from backports.functools_lru_cache import lru_cache # noqa F401
import copy_reg as copyreg # noqa F401
from collections import Hashable # noqa F401
from collections import Hashable, Mapping # noqa F401

ustr = unicode # noqa
bstr = str # noqa
Expand Down

0 comments on commit 36dcc0f

Please sign in to comment.