diff --git a/agate/mapped_sequence.py b/agate/mapped_sequence.py index 2e6222dcc..16fb3c927 100644 --- a/agate/mapped_sequence.py +++ b/agate/mapped_sequence.py @@ -6,7 +6,11 @@ rows and columns. """ -from collections import OrderedDict, Sequence +from collections import OrderedDict +try: + from collections.abc import Sequence +except ImportError: + from collections import Sequence import six from six.moves import range # pylint: disable=W0622 diff --git a/agate/utils.py b/agate/utils.py index ad9242147..ae6aab9fa 100644 --- a/agate/utils.py +++ b/agate/utils.py @@ -6,7 +6,11 @@ agate. """ -from collections import OrderedDict, Sequence +from collections import OrderedDict +try: + from collections.abc import Sequence +except ImportError: + from collections import Sequence from functools import wraps import math import string