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
, andMISSING
to become incomparable after acopy
ordeepcopy
.
v1.1.2 - 2019-03-29
- Fix issue #9 relating to the
dataclass_builder
factory function failing to handle dataclasses which use types from thetyping
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) withREQUIRED
andOPTIONAL
constants.
v1.0.1 - 2019-03-26
- Fixed trove classifiers.
v1.0.0 - 2019-03-26
First stable release.
BREAKS BACKWARDS COMPATIBILITY
- Moved
REQUIRED
andOPTIONAL
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 versiondataclass_builder
. - Change how
DataclassBuilder
handles unset fields so that they will be initialized toREQUIRED
andOPTIONAL
in order to be compatible with the classes returned from thedataclass_builder
factory. - Fields passed in the
__init__
method ofDataclassBuilder
will now raiseTypeError
(instead ofUndefinedFieldError
) the same as classes build with thedataclass_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
andfields
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.
- Added
DataclassBuilder
class to wrap Python dataclasses with a factory implementing the builder pattern. - Added
build
function to construct a dataclass from aDataclassBuilder
. - Added
fields
function to extract information about the available fields from aDataclassBuilder
.