diff --git a/stix2/base.py b/stix2/base.py index 375030d..d905fb0 100644 --- a/stix2/base.py +++ b/stix2/base.py @@ -16,9 +16,7 @@ from .exceptions import ( ) from .markings import _MarkingsMixin from .markings.utils import validate -from .serialization import ( - STIXJSONEncoder, STIXJSONIncludeOptionalDefaultsEncoder, serialize, -) +from .serialization import STIXJSONEncoder, serialize from .utils import NOW, PREFIX_21_REGEX, get_timestamp from .versioning import new_version as _new_version from .versioning import revoke as _revoke @@ -28,10 +26,6 @@ try: except ImportError: from collections import Mapping -# TODO: Remove STIXJSONEncoder, STIXJSONIncludeOptionalDefaultsEncoder, serialize from __all__ on next major release. -# Kept for backwards compatibility. -__all__ = ['STIXJSONEncoder', 'STIXJSONIncludeOptionalDefaultsEncoder', '_STIXBase', 'serialize'] - DEFAULT_ERROR = "{type} must have {property}='{expected}'." SCO_DET_ID_NAMESPACE = uuid.UUID("00abedb4-aa42-466c-9c01-fed23315a9b7") diff --git a/stix2/v20/common.py b/stix2/v20/common.py index d68b4a7..4b7c299 100644 --- a/stix2/v20/common.py +++ b/stix2/v20/common.py @@ -74,7 +74,6 @@ class TLPMarking(_STIXBase20): `the STIX 2.0 specification `__. """ - # TODO: don't allow the creation of any other TLPMarkings than the ones below _type = 'tlp' _properties = OrderedDict([ ('tlp', StringProperty(required=True)), diff --git a/stix2/v21/common.py b/stix2/v21/common.py index 12e70f2..83d6fa4 100644 --- a/stix2/v21/common.py +++ b/stix2/v21/common.py @@ -91,9 +91,9 @@ class LanguageContent(_STIXBase21): ('created', TimestampProperty(default=lambda: NOW, precision='millisecond', precision_constraint='min')), ('modified', TimestampProperty(default=lambda: NOW, precision='millisecond', precision_constraint='min')), ('object_ref', ReferenceProperty(valid_types=["SCO", "SDO", "SRO"], spec_version='2.1', required=True)), - # TODO: 'object_modified' it MUST be an exact match for the modified time of the STIX Object (SRO or SDO) being referenced. + # TODO: 'object_modified' MUST be an exact match for the modified time of the STIX Object being referenced ('object_modified', TimestampProperty(precision='millisecond')), - # TODO: 'contents' https://docs.google.com/document/d/1ShNq4c3e1CkfANmD9O--mdZ5H0O_GLnjN28a_yrEaco/edit#heading=h.cfz5hcantmvx + # TODO: Implement 'contents' property requirements as defined in STIX 2.1 CS02 ('contents', DictionaryProperty(spec_version='2.1', required=True)), ('revoked', BooleanProperty(default=lambda: False)), ('labels', ListProperty(StringProperty)), diff --git a/stix2/v21/observables.py b/stix2/v21/observables.py index 6fb218c..a9cf2ae 100644 --- a/stix2/v21/observables.py +++ b/stix2/v21/observables.py @@ -468,7 +468,6 @@ class HTTPRequestExt(_Extension): class ICMPExt(_Extension): - # TODO: Add link """For more detailed information on this object's properties, see `the STIX 2.1 specification `__. """