Skip to content

Commit bbcfccd

Browse files
committed
changes to prevent deprecation warnings
1 parent 2da84ee commit bbcfccd

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

maec/utils/comparator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# MAEC Comparator Classes
2-
import collections
2+
from mixbox import compat
33

44
class ComparisonResult(object):
55
def __init__(self, bundle_list, lookup_table):
@@ -154,7 +154,7 @@ def get_val(cls, obj, typed_field, hash_val, nested_elements = None):
154154
val = getattr(obj.properties, str(typed_field))
155155
if val is not None:
156156
hash_val += str(typed_field) + ":"
157-
if isinstance(val, collections.MutableSequence):
157+
if isinstance(val, compat.MutableSequence):
158158
for list_item in val:
159159
if '/' in str(nested_elements[0]):
160160
hash_val += '['

maec/utils/deduplicator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
# See LICENSE.txt for complete terms
66

7-
import collections
87
import copy
98

9+
from mixbox import compat
1010
from mixbox import entities
1111

1212
from cybox.core import RelatedObject, AssociatedObject
@@ -179,7 +179,7 @@ def get_typedfield_values(cls, val, name, values, ignoreCase=False):
179179
# If the value is a mutable sequence, attempt to find TypedFields as
180180
# in each item. EntityLists are Entity subclasses that can have
181181
# TypedFields, so we don't make this an elif.
182-
if isinstance(val, collections.MutableSequence):
182+
if isinstance(val, compat.MutableSequence):
183183
for list_item in val:
184184
cls.get_typedfield_values(list_item, name, values, ignoreCase)
185185

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_long_description():
3030
install_requires = [
3131
'lxml>=2.2.3 ; python_version == "2.7" or python_version >= "3.5"',
3232
'lxml>=2.2.3,<4.4.0 ; python_version > "2.7" and python_version < "3.5"',
33-
'mixbox>=1.0.2',
33+
'mixbox>=1.0.4',
3434
'cybox>=2.1.0.13,<2.1.1.0',
3535
]
3636

0 commit comments

Comments
 (0)