Skip to content

Commit

Permalink
Merge pull request #2 from j-i-l/fix-collections-import
Browse files Browse the repository at this point in the history
Fix deprecated import statement for classes from collections.abc
  • Loading branch information
j-i-l committed Nov 18, 2021
2 parents 919a486 + 4e9d99f commit 7ba364f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion majortrack/lazylist.py
@@ -1,12 +1,16 @@
from __future__ import absolute_import, print_function, unicode_literals
import os
from datetime import datetime
from collections import MutableSequence
import pickle
import shutil
import itertools
import atexit

try:
from collections.abc import MutableSequence # noqa
except ImportError:
from collections import MutableSequence # noqa


class lazy_list(MutableSequence):
def __init__(
Expand Down
5 changes: 4 additions & 1 deletion majortrack/tracker.py
Expand Up @@ -5,7 +5,10 @@
"""
import itertools
from functools import wraps
from collections import Counter
try:
from collections.abc import Counter # noqa
except ImportError:
from collections import Counter # noqa
from datetime import timedelta

from .lazylist import lazy_list
Expand Down

0 comments on commit 7ba364f

Please sign in to comment.