cti-python-stix2/stix2
Michael Chisholm c7b4840232 Code style and behavioral improvements in ExtensionsProperty:
- Changed an error message "Cannot determine extension type."
At that point in the code, we in fact have a registered
extension type and the class for it, so it didn't seem to make
any sense.  I changed it to say that an extension of that type
couldn't be created from type of value given.  Because this is
really about typing (in both the old and new code), I also
changed the exception class to TypeError.

- Changed customization behavior: unregistered
"extension-definition--" style extensions are no longer
considered custom.  Their mere presence can no longer be
considered a customization, since it doesn't fit the
criteria, and in fact the extension mechanism is supposed to
supplant the old customization system anyway.  Unregistered
extensions of other types are still considered custom.

- Fixed up unit tests according to the exception message
change.

- Added a unit test for unregistered "extension-definition--"
style extensions.
2021-06-25 22:20:02 -04:00
..
canonicalization Revert JSON canonicalization code 2021-02-18 12:21:52 -05:00
confidence update project documentation. 2018-11-28 16:51:00 -05:00
datastore Merge pull request #500 from emmanvg/add-fp-serialize 2021-03-19 21:13:30 -04:00
equivalence Update __init__.py 2021-03-12 16:49:23 -05:00
markings Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into dev-extensions-proposal 2021-02-19 21:54:46 -05:00
test Code style and behavioral improvements in ExtensionsProperty: 2021-06-25 22:20:02 -04:00
v20 Remove relics of the old way customization was handled and 2021-06-25 22:10:31 -04:00
v21 Remove relics of the old way customization was handled and 2021-06-25 22:10:31 -04:00
__init__.py Fix import sort order 2021-01-15 10:27:39 -05:00
base.py Fix tests, add a loophole to allow custom content 2021-06-14 17:34:06 -04:00
custom.py Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into dev-extensions-proposal 2021-02-19 21:54:46 -05:00
environment.py Update stix2/environment.py 2021-03-10 09:52:24 -05:00
exceptions.py Add some missing docstrings on a few exception classes. 2021-01-28 23:02:23 -05:00
hashes.py Add proper customization enforcement for open vocabs. This adds 2021-03-31 16:20:28 -04:00
parsing.py Update guide docs, remove outdated comments 2021-04-14 16:39:56 -04:00
pattern_visitor.py Remove six dependency (backwards breaking) 2021-02-18 12:38:35 -05:00
patterns.py few leftover changes... 2021-02-19 22:15:11 -05:00
properties.py Code style and behavioral improvements in ExtensionsProperty: 2021-06-25 22:20:02 -04:00
registration.py couple of changes after merging against master 2021-02-19 10:05:56 -05:00
registry.py Update guide docs, remove outdated comments 2021-04-14 16:39:56 -04:00
serialization.py apply fp_serialize() changes on main serialize() method 2021-03-18 18:08:31 -04:00
utils.py Clean up ReferenceProperty.clean(), to use new APIs which are 2021-03-31 20:01:27 -04:00
version.py Small tweaks: move the definition of DEFAULT_VERSION from the 2021-01-13 11:22:34 -05:00
versioning.py Initial revamp of customization enforcement and detection. 2021-03-31 15:21:55 -04:00
workbench.py Improve versioning.new_version() to better handle custom objects 2021-01-28 23:02:23 -05:00