Skip to content

0.8.0

Compare
Choose a tag to compare
@dargueta dargueta released this 02 Jul 15:15
· 148 commits to master since this release

Released 2020-07-02

New Features

Official support for Python 3.9.

Bugfixes

  • _do_load() could be given None for the loaded_fields argument even though the documentation explicitly stated that it was guaranteed to not be.
  • _do_dump() would get given bytes as its value argument if the field's default value was None.
  • The present callable was sometimes passed too few arguments, potentially resulting in a TypeError.
  • Dumping an unsized iterable in an Array no longer crashes.
  • Dumping a missing field whose default callable returns UNDEFINED now throws the expected MissingRequiredValueError exception instead of trying to serialize UNDEFINED.
  • 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(), and dumps() methods which were deprecated in 0.6.2.
  • Array now skips over fields loading as NOT_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 from Integer.
  • _NamedSentinel has been eliminated. In keeping with PEP 484, sentinel values such as UNDEFINED and NOT_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.