diff options
| author | Anton Kochkov <anton.kochkov@gmail.com> | 2020-06-10 16:27:48 +0800 |
|---|---|---|
| committer | Anton Kochkov <anton.kochkov@gmail.com> | 2020-06-15 18:11:49 +0800 |
| commit | 01f3536e8ee31409f262f41a76604755acd7f9d7 (patch) | |
| tree | f9efa287cecd0b3220b79a0545c3b0a078d7a1ac | |
| parent | 975a527b4f268c4e41ab5ab259442c0941da6709 (diff) | |
| download | miasm-01f3536e8ee31409f262f41a76604755acd7f9d7.tar.gz miasm-01f3536e8ee31409f262f41a76604755acd7f9d7.zip | |
Fix collections deprecation warnings
| -rw-r--r-- | miasm/core/utils.py | 6 | ||||
| -rw-r--r-- | miasm/jitter/jitload.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/miasm/core/utils.py b/miasm/core/utils.py index 37248c40..da7050f7 100644 --- a/miasm/core/utils.py +++ b/miasm/core/utils.py @@ -3,7 +3,11 @@ import sys from builtins import range import struct import inspect -from collections import MutableMapping as DictMixin + +try: + from collections.abc import MutableMapping as DictMixin +except ImportError: + from collections import MutableMapping as DictMixin from operator import itemgetter import codecs diff --git a/miasm/jitter/jitload.py b/miasm/jitter/jitload.py index 85d5636f..20d795e6 100644 --- a/miasm/jitter/jitload.py +++ b/miasm/jitter/jitload.py @@ -1,7 +1,11 @@ import logging import warnings from functools import wraps -from collections import Sequence, namedtuple +from collections import namedtuple +try: + from collections.abc import Sequence +except ImportError: + from collections import Sequence from future.utils import viewitems |