From 998eaa7ac39e3a62932b310ce19241a91b90a7ac Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 21 Jan 2020 20:36:45 +0200 Subject: [PATCH 1/2] sudo no longer needed https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) 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 From 0c9c08856bff1e60cb14ea9a2fdfa640c9af9eeb Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 21 Jan 2020 20:44:26 +0200 Subject: [PATCH 2/2] Fix collections.abc imports for Python 3.9 --- awscli/customizations/history/db.py | 4 ++-- tests/__init__.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) 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