Repository navigation
0.11.1
Bugfixes
- Fixed #38. Computing the length of a struct when it has a nested variable-length struct no longer crashes. Thank you @kirill-varchenko for the bug report.
- Fixed a bunch of wrong typing in the
Unionfield as well as in the prototype ofField._do_dump().Nestedwas also fixed. to_dict()crashed in certain cases on Python 3.7 and 3.8 due to implementation details of ChainMap in those versions. This has been fixed.
Deprecations
to_dict() currently swallows all binobj exceptions. Because this can hide bugs in a field implementation or other some other problem, this behavior is deprecated for all exceptions not directly related to serialization. A future release will only catch serialization-related errors; until then, a warning is issued but the exception is still swallowed.
Other Changes
Nested is now annotated as type-invariant, meaning Nested(X) will only load and dump instances of X. Before, it was erroneously annotated such that X and any subclass of it were valid. This is now in line with its intended usage. Static type checking for users' code may break but the class still behaves the same.