cattrs v22.1.0 Release Notes
Release Date: 2022-04-03 // about 2 years ago-
- cattrs now uses the CalVer versioning convention.
- โ
cattrs now has a detailed validation mode, which is enabled by default. Learn more
here <https://cattrs.readthedocs.io/en/latest/validation.html>
_. The old behavior can be restored by creating the converter withdetailed_validation=False
. attrs
and dataclass structuring is now ~25% faster.- ๐ Fix an issue structuring bare
typing.List
s on Pythons lower than 3.9. (#209 <https://github.com/python-attrs/cattrs/issues/209>
_) - ๐ Fix structuring of non-parametrized containers like
list/dict/...
on Pythons lower than 3.9. (#218 <https://github.com/python-attrs/cattrs/issues/218>
_) - ๐ Fix structuring bare
typing.Tuple
on Pythons lower than 3.9. (#218 <https://github.com/python-attrs/cattrs/issues/218>
_) - Fix a wrong
AttributeError
of an missing__parameters__
attribute. This could happen when inheriting certain generic classes โ for exampletyping.*
classes are affected. (#217 <https://github.com/python-attrs/cattrs/issues/217>
_) - ๐ Fix structuring of
enum.Enum
instances intyping.Literal
types. (#231 <https://github.com/python-attrs/cattrs/pull/231>
_) - ๐ Fix unstructuring all tuples - unannotated, variable-length, homogenous and heterogenous - to
list
. (#226 <https://github.com/python-attrs/cattrs/issues/226>
_) - For
forbid_extra_keys
raise customForbiddenExtraKeyError
instead of genericException
. (#225 <https://github.com/python-attrs/cattrs/pull/225>
_) - ๐ All preconf converters now support
loads
anddumps
directly. See an examplehere <https://cattrs.readthedocs.io/en/latest/preconf.html>
_. - ๐ Fix mappings with byte keys for the orjson, bson and tomlkit converters.
(
#241 <https://github.com/python-attrs/cattrs/issues/241>
_)