cattrs v1.1.0 Release Notes

Release Date: 2020-10-29 // over 3 years ago
    • 👍 Python 2, 3.5 and 3.6 support removal. If you need it, use a version below 1.1.0.
    • 👍 Python 3.9 support, including support for built-in generic types (list[int] vs typing.List[int]).
    • cattrs now includes functions to generate specialized structuring and unstructuring hooks. Specialized hooks are faster and support overrides (omit_if_default and rename). See the cattr.gen module.
    • 0️⃣ cattrs now includes a converter variant, cattr.GenConverter, that automatically generates specialized hooks for attrs classes. This converter will become the default in the future.
    • Generating specialized structuring hooks now invokes attr.resolve_types <https://www.attrs.org/en/stable/api.html#attr.resolve_types>_ on a class if the class makes use of the new PEP 563 annotations.
    • cattrs now depends on attrs >= 20.1.0, because of attr.resolve_types.
    • 0️⃣ Specialized hooks now support generic classes. The default converter will generate and use a specialized hook upon encountering a generic class.