diff --git a/.travis.yml b/.travis.yml index 61446946bf80..07939517e39b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,22 +3,16 @@ matrix: include: - python: 2.7 dist: trusty - sudo: false - python: 3.4 dist: trusty - sudo: false - python: 3.5 dist: trusty - sudo: false - python: 3.6 dist: trusty - sudo: false - python: 3.7 dist: xenial - sudo: true - python: 3.8 dist: xenial - sudo: true before_install: - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then diff --git a/awscli/customizations/history/db.py b/awscli/customizations/history/db.py index a171cdc61bbe..bdb96d1dc4bd 100644 --- a/awscli/customizations/history/db.py +++ b/awscli/customizations/history/db.py @@ -16,7 +16,7 @@ import datetime import threading import logging -from collections import MutableMapping +from awscli.compat import collections_abc from botocore.history import BaseHistoryHandler @@ -119,7 +119,7 @@ def encode(self, obj): def default(self, obj): if isinstance(obj, datetime.datetime): return self._encode_datetime(obj) - elif isinstance(obj, MutableMapping): + elif isinstance(obj, collections_abc.MutableMapping): return self._encode_mutable_mapping(obj) elif isinstance(obj, binary_type): # In PY3 the bytes type differs from the str type so the default diff --git a/tests/__init__.py b/tests/__init__.py index f4db67c2cae9..b9390e067425 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,9 +1,8 @@ -from collections import MutableMapping -from collections import Mapping +from awscli.compat import collections_abc # CaseInsensitiveDict from requests that must be serializble. -class CaseInsensitiveDict(MutableMapping): +class CaseInsensitiveDict(collections_abc.MutableMapping): def __init__(self, data=None, **kwargs): self._store = dict() if data is None: @@ -36,7 +35,7 @@ def lower_items(self): ) def __eq__(self, other): - if isinstance(other, Mapping): + if isinstance(other, collections_abc.Mapping): other = CaseInsensitiveDict(other) else: return NotImplemented