-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address big integers bug #892
Address big integers bug #892
Conversation
I'm hoping to not do that in this PR... I think that entails a bunch of other small changes to true the whole class up to |
Ahh, gotcha. Sounds good. |
- to remove integer ambiguity around 32/64bit integers, we coerce all ints to int64_t.
- When a uint64_t is serialized, it is bitwise & with INT64_MAX first to avoid overflowing the integer. In order to do that comparison at serialization time, the uint64_t needs to be stored as a uint64_t all the way through the python bindings into the any mapping. - the next step is to move the & operation up into the python bindings and prevent people from storing invalid numbers in OTIO files.
Please enter the commit message for your changes. Lines starting
- this is to allow parity with the values in python files
- add support in the serializer/deserializer for NaN, Inf, -Infinity etc from rapidjson - block pybind11 from automatically casting numbers that don't fit into double or int64_t into bool - add a unit test and test data to test the serialization and behavior
- Adds specific messages that test if something is an out of range integer, or an invalid type - includes a list of supported types
- The 'Writer' part of SerializableObject needed the same tightening as the RapidJSON dispatcher - this is used for things that serialize and compare JSON (like cloning and the `is_equivalent_to` method. - Because the ImageSequenceReference schema has `int` in it (which should at some point be changed to int64_t), it was tripping this check on certain platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great clarification!
Codecov Report
@@ Coverage Diff @@
## master #892 +/- ##
==========================================
- Coverage 86.15% 86.10% -0.05%
==========================================
Files 183 184 +1
Lines 17719 17850 +131
Branches 1970 1982 +12
==========================================
+ Hits 15265 15369 +104
- Misses 1956 1977 +21
- Partials 498 504 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Closes #884
int64_t
bool
int64_t
double
(includingNaN
,Inf
,-Infinity
support)SerializableObject
RationalTime
,TimeTransform
andTimeRange
TypeError: A value of type '<type 'set'>' is incompatible with OpenTimelineIO. OpenTimelineIO only supports the following value types in AnyDictionary containers (like the .metadata dictionary): ('int', 'float', 'str', 'bool', 'list', 'dictionary', 'opentime.RationalTime', 'opentime.TimeRange', 'opentime.TimeTransform').
ValueError: A value of 36893488147419103232 is outside of the range of integers that OpenTimelineIO supports, [-9223372036854775808, 9223372036854775807], which is the range of C++ int64_t.
TODO: