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 with detailed_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 example typing.* classes are affected. (#217 <https://github.com/python-attrs/cattrs/issues/217>_)
    • ๐Ÿ›  Fix structuring of enum.Enum instances in typing.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 custom ForbiddenExtraKeyError instead of generic Exception. (#225 <https://github.com/python-attrs/cattrs/pull/225>_)
    • ๐Ÿ‘€ All preconf converters now support loads and dumps directly. See an example here <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>_)