Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,10 @@ def __repr__(self):

# register the context as mapping if possible
try:
from collections import Mapping
try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping

Mapping.register(Context)
except ImportError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@

#: register Python 2.6 abstract base classes
try:
from collections import MutableSet, MutableMapping, MutableSequence
try:
from collections.abc import MutableSet, MutableMapping, MutableSequence
except ImportError:
from collections import MutableSet, MutableMapping, MutableSequence

_mutable_set_types += (MutableSet,)
_mutable_mapping_types += (MutableMapping,)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,10 @@ def __reversed__(self):

# register the LRU cache as mutable mapping if possible
try:
from collections import MutableMapping
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping

MutableMapping.register(LRUCache)
except ImportError:
Expand Down