Skip to content

0.6.1

Compare
Choose a tag to compare
@dargueta dargueta released this 22 Feb 15:54
· 196 commits to master since this release

Released: 2019-02-22

Bugfixes

  • Array used to dump all items in the iterable given to it, ignoring count. Now it respects count, and will throw an ArraySizeError if given too many or too few elements.
  • Timestamp and subclasses treated naive timestamps as in the local timezone when dumping, but when tz_aware is False timestamps were loaded in UTC instead of being converted to the local timezone. This asymmetric behavior has been corrected, and naive datetimes are always local.
  • Bytes would always write its const value, even if a different value was passed to it.
  • Bytes always treated its size as if it were an integer, and never supported other valid things like field names or objects, even though all other scalar fields do.
  • Bytes didn't support being unsized.
  • Bytes threw an UnserializableValueError if given anything other than bytes or a bytearray. This was not in line with the other fields' behavior where they would "let it crash" if given an invalid type.

Other Changes

  • Validators are no longer called when setting a field value. This would cause crashes when a validator depends on two fields; if one is updated, the condition may no longer be true, even if the user would've updated both fields before dumping.
  • field_object.default will return const if const is defined but no default value was passed in. If you think about it, this makes far more sense than the original behavior where it returned UNDEFINED.
  • Added new example with CPIO archive reader.