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]
vstyping.List[int]
). cattrs
now includes functions to generate specialized structuring and unstructuring hooks. Specialized hooks are faster and support overrides (omit_if_default
andrename
). See thecattr.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 onattrs
>= 20.1.0, because ofattr.resolve_types
.- 0️⃣ Specialized hooks now support generic classes. The default converter will generate and use a specialized hook upon encountering a generic class.