Skip to content

Commit 6152fea

Browse files
authored
Merge pull request wireservice#737 from quantrocket-llc/collections-abc
import Sequence from collections.abc to suppress warning in python 3.…
2 parents b2d1ebb + 1ba2a8d commit 6152fea

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

agate/mapped_sequence.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
rows and columns.
77
"""
88

9-
from collections import OrderedDict, Sequence
9+
from collections import OrderedDict
10+
try:
11+
from collections.abc import Sequence
12+
except ImportError:
13+
from collections import Sequence
1014

1115
import six
1216
from six.moves import range # pylint: disable=W0622

agate/utils.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
agate.
77
"""
88

9-
from collections import OrderedDict, Sequence
9+
from collections import OrderedDict
10+
try:
11+
from collections.abc import Sequence
12+
except ImportError:
13+
from collections import Sequence
1014
from functools import wraps
1115
import math
1216
import string

0 commit comments

Comments
 (0)