0.8.0
Released 2020-07-02
New Features
Official support for Python 3.9.
Bugfixes
_do_load()
could be givenNone
for theloaded_fields
argument even though the documentation explicitly stated that it was guaranteed to not be._do_dump()
would get given bytes as itsvalue
argument if the field's default value wasNone
.- The
present
callable was sometimes passed too few arguments, potentially resulting in aTypeError
. - Dumping an unsized iterable in an
Array
no longer crashes. - Dumping a missing field whose
default
callable returnsUNDEFINED
now throws the expectedMissingRequiredValueError
exception instead of trying to serializeUNDEFINED
. - Test on PyPy 3.6 like we claimed we were. Accidentally deleted that in the travis.yml file.
Breaking Changes
- Removed the
load()
,loads()
,dump()
, anddumps()
methods which were deprecated in 0.6.2. Array
now skips over fields loading asNOT_PRESENT
when loading.Field
is now a generic container class, which means all subclasses must define their value type. This only affects users that created their own subclasses.
Other Changes
- PEP 484 type annotations have been added.
Timestamp
and its subclasses no longer inherit fromInteger
._NamedSentinel
has been eliminated. In keeping with PEP 484, sentinel values such asUNDEFINED
andNOT_PRESENT
are now enums. For more information on why, see Support for Singleton Types in Unions in the PEP 484 documentation.from binobj.errors import *
now only imports the exception classes.- Travis no longer supports PyPy 3.5 so we have to stop testing on it, but the tests pass on CPython 3.5 and PyPy 3.6 so I think you're okay for now.