Skip to content

Commit

Permalink
import Sequence from collections.abc to suppress warning in python 3.…
Browse files Browse the repository at this point in the history
…7/3.8
  • Loading branch information
brian-from-quantrocket committed Apr 1, 2020
1 parent b2d1ebb commit 1ba2a8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion agate/mapped_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion agate/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ba2a8d

Please sign in to comment.