Skip to content

Latest commit

 

History

History
130 lines (92 loc) · 4.59 KB

CHANGELOG.rst

File metadata and controls

130 lines (92 loc) · 4.59 KB

Changelog

v1.2.0 - 2019-08-21

  • Add update function to facilitate updating a dataclass or dataclass builder from a partially completed dataclass builder.

v1.1.3 - 2019-08-07

  • Switch to reST docstrings and remove paramref requirement.
  • Fix bug in dataclass builders that contains a field named fields.
  • Fix return type annotation of the build method.
  • Fix issue #12 which would cause sentinel values REQUIRED, OPTIONAL, and MISSING to become incomparable after a copy or deepcopy.

v1.1.2 - 2019-03-29

  • Fix issue #9 relating to the dataclass_builder factory function failing to handle dataclasses which use types from the typing module.
  • Replace equality checks with identity checks where possible. This was not only the intention of the checks but by using identity, compatibility with types that have broken equality operators is restored.

v1.1.1 - 2019-03-27

  • Fix bug where the MISSING constant was not exported at the package level.

v1.1.0 - 2019-03-27

  • Make MISSING constant comparable (True) with REQUIRED and OPTIONAL constants.

v1.0.1 - 2019-03-26

  • Fixed trove classifiers.

v1.0.0 - 2019-03-26

First stable release.

BREAKS BACKWARDS COMPATIBILITY

  • Moved REQUIRED and OPTIONAL constants into ._common with exports at the package level.
  • Fixed bug in DataclassBuilder.__repr__ causing some types of fields such as strings to not display properly.
  • Rewrite DataclassBuilder to share functions with the factory version dataclass_builder.
  • Change how DataclassBuilder handles unset fields so that they will be initialized to REQUIRED and OPTIONAL in order to be compatible with the classes returned from the dataclass_builder factory.
  • Fields passed in the __init__ method of DataclassBuilder will now raise TypeError (instead of UndefinedFieldError) the same as classes build with the dataclass_builder factory.
  • Disabled positional arguments for builders generated with the dataclass_builder factory.
  • Fixed documentation mismatches. The documentation both in the README and in the module docstrings properly reflect the API.

v0.0.3 - 2019-03-26

  • Added .factory.dataclass_builder factory function to create builder classes for specific dataclasses.
  • Moved build and fields functions to the .utility submodule with exports at the top level.
  • Moved DataclassBuilder to the .wrapper submodule with exports at the top level.
  • Fixed issue #4 which caused typing errors in code using DataclassBuilder.

v0.0.2 - 2019-03-12

  • Added additional unit tests.
  • Fixed issue #1 preventing DataclassBuilder from being subclassed.
  • Fields beginning with an underscore will no longer be checked.

v0.0.1 - 2019-03-11

  • Added DataclassBuilder class to wrap Python dataclasses with a factory implementing the builder pattern.
  • Added build function to construct a dataclass from a DataclassBuilder.
  • Added fields function to extract information about the available fields from a DataclassBuilder.