0.6.1
Released: 2019-02-22
Bugfixes
Array
used to dump all items in the iterable given to it, ignoringcount
. Now it respectscount
, and will throw anArraySizeError
if given too many or too few elements.Timestamp
and subclasses treated naive timestamps as in the local timezone when dumping, but whentz_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 itsconst
value, even if a different value was passed to it.Bytes
always treated itssize
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 anUnserializableValueError
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 returnconst
ifconst
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 returnedUNDEFINED
.- Added new example with CPIO archive reader.