Merged
Conversation
…nch off of v2.1.0.11 tag to apply the type_ field changes.
Changes in build() methods to support strong bindings for cybox objects
to mixbox (in a branch of the same name as this).
and from_obj() methods. * Added VocabFactory class to vocabs module. * Refactored VocabString to use TypedFields. * Refactored VocabField to use VocabFactory. * Added ObjectPropertiesFactory class to use for ObjectProperties xsi:type resolution. * Still lots of unit test failures!
…2.7 and python3.4.
* Added ListFieldMixin class that allows TypedFields to be set to a list of values or a single value. This is used by all BaseProperty concrete classes. * Added several ListFieldMixin implementations to BaseProperty subclass value TypedFields. * Fixed several datatype mismatch bugs between the API and binding classes.
…d _datatype_dict_value().
…lect new id/idref constraints.
module. * The Artifact.packaging field is still not a TypedField and could take a lot of work to get there. * Added EncodingFactory, EncryptionFactory, and CompressionFactory classes. * Removed factory functionality from the Compression and Encryption classes (get_object()).
Complements Bryan's one_pass_namespaces "cleanup" mixbox PR
vocab (class) it's checking, not just the set of allowed values.
Typedfields branch fixes to nosetests
…ect/python-cybox into namespaces_integration
doesn't look all messed up under python3.
The code
ustr = six.u("<some utf8 bytes>")
doesn't do what the original author thought it did under python2.
That's a narrow char string of utf8 bytes, and six.u() is hard-coded
to decode using the "unicode_escape" encoding, which is the "\u1234"
syntax. There are no unicode escapes there, so a proper decoding
never happens. I fixed it to use unicode escapes instead of utf8
encoded literals.
Contributor
Author
|
Thanks, @gtback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently fails on Sphinx doctests because the str() function of datetime.datetime is equivalent to calling .isoformat(' ') on it [1], which replaces the 'T' with a space. This results in an invalid timestamp.
For a truncated example:
I'm not sure of the best place to put code to fix this, though. Maybe in cybox/utils/init.py, in normalize_to_xml() [2], we could check if value is instance of datetime.datetime and if so use value.isoformat() instead of text_type(value)?