diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-08-14 11:56:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-14 11:56:13 +0200 |
| commit | a01c29cd82f5a717e8dee622002e1ca3e189f420 (patch) | |
| tree | c6653b7b278ccc8d8e2daf57d6bf13e8c64e3fcd | |
| parent | 673392b248f2e69f4acb7c311d560c85ef0a85f1 (diff) | |
| parent | 01f3536e8ee31409f262f41a76604755acd7f9d7 (diff) | |
| download | miasm-a01c29cd82f5a717e8dee622002e1ca3e189f420.tar.gz miasm-a01c29cd82f5a717e8dee622002e1ca3e189f420.zip | |
Merge pull request #1253 from XVilka/fix-collections
Fix collections
| -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 ed630bde..cfe96de4 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 |