diff --git a/setup.py b/setup.py index a034bda..3a681fa 100644 --- a/setup.py +++ b/setup.py @@ -47,10 +47,10 @@ setup( keywords="stix stix2 json cti cyber threat intelligence", packages=find_packages(), install_requires=[ - 'pytz', - 'six', 'python-dateutil', + 'pytz', 'requests', - 'simplejson' + 'simplejson', + 'six' ], ) diff --git a/stix2/sources/__init__.py b/stix2/sources/__init__.py index c4a0f0f..6b8513e 100644 --- a/stix2/sources/__init__.py +++ b/stix2/sources/__init__.py @@ -529,7 +529,6 @@ class CompositeDataSource(object): """ return copy.deepcopy(self.data_sources.values()) - def deduplicate(self, stix_obj_list): """Deduplicate a list of STIX objects to a unique set diff --git a/stix2/sro.py b/stix2/sro.py index 23f0dd0..af483bc 100644 --- a/stix2/sro.py +++ b/stix2/sro.py @@ -4,9 +4,9 @@ from collections import OrderedDict from .base import _STIXBase from .common import ExternalReference, GranularMarking -from .properties import (BooleanProperty, IDProperty, IntegerProperty, ListProperty, - ReferenceProperty, StringProperty, TimestampProperty, - TypeProperty) +from .properties import (BooleanProperty, IDProperty, IntegerProperty, + ListProperty, ReferenceProperty, StringProperty, + TimestampProperty, TypeProperty) from .utils import NOW diff --git a/stix2/utils.py b/stix2/utils.py index dc25799..aa0caa6 100644 --- a/stix2/utils.py +++ b/stix2/utils.py @@ -1,13 +1,13 @@ """Utility functions and classes for the stix2 library.""" -from stix2 import base - import datetime as dt import json from dateutil import parser import pytz +from .base import _STIXBase + # Sentinel value for properties that should be set to the current time. # We can't use the standard 'default' approach, since if there are multiple # timestamps in a single object, the timestamps will vary by a few microseconds. @@ -132,7 +132,7 @@ def find_property_index(obj, properties, tuple_to_find): for pv in obj._inner.values(): if isinstance(pv, list): for item in pv: - if isinstance(item, base._STIXBase): + if isinstance(item, _STIXBase): val = find_property_index(item, item._object_properties(), tuple_to_find) @@ -145,7 +145,7 @@ def find_property_index(obj, properties, tuple_to_find): except ValueError: return len(tuple_to_find[0]) for item in pv.values(): - if isinstance(item, base._STIXBase): + if isinstance(item, _STIXBase): val = find_property_index(item, item._object_properties(), tuple_to_find)