Recent Releases of undictify
undictify - 0.8.0
For custom converters, we can now choose if they should be mandatory or optional. Up to now, they were only optional.
This is an API-breaking change. So if you'd like to update old (<0.8.0) code, you need to change this:
python3
@type_checked_constructor(converters={'foo': conv_foo})
@dataclass
class Foo:
foo: ...
to that:
python3
@type_checked_constructor(converters={'foo': optional_converter(conv_foo)})
@dataclass
class Foo:
foo: ...
because the default (and only) behavior of converters was to be optional.
Now, there is a new option to use optional_converter instead.
- Python
Published by Dobiasd over 6 years ago
undictify - 0.3.0
- Simplify/unify API to only
type_checked_callwith parameters
breaking changes:
@type_checked_callbecomes@type_checked_call()@type_checked_call_skipbecomes@type_checked_call(skip=True)@type_checked_call_convertbecomes@type_checked_call(convert=True)@type_checked_call_skip_convertbecomes@type_checked_call(skip=True, convert=True)type_checked_apply(func, args)becomestype_checked_call()(func)(args)type_checked_apply_skip(func, args)becomestype_checked_call(skip=True)(func)(args)type_checked_apply_convert(func, args)becomestype_checked_call(convert=True)(func)(args)type_checked_apply_skip_convert(func, args)becomestype_checked_call(skip=True, convert=True)(func)(args)
- Python
Published by Dobiasd almost 8 years ago
undictify - 0.2.0
features: - Decorators for more convenient usage - Support for args in addition to kwargs - Support for standard dictionary unpacking syntax
breaking changes:
- removed unpack_json and unpack dict in favor of more general syntax described in README.md
- Python
Published by Dobiasd almost 8 years ago