attrs v20.3.0 Release NotesRelease Date: 2020-11-05 // over 1 year ago
This release does not change change anything about them and they are already used widely in production though.
If you wish to use them together with mypy, you can simply drop
this plugin <https://gist.github.com/hynek/1e3844d0c99e479e716169034b5fa963#file-attrs_ng_plugin-py>_ into your project.
Feel free to provide feedback to them in the linked issue #668.
We will release the
attrsnamespace once we have the feeling that the APIs have properly settled.
🔄 Changes ^
attr.s()now has a field_transformer hook that is called for all
Attribute\ s and returns a (modified or updated) list of
attr.asdict()has a value_serializer hook that can change the way values are converted. Both hooks are meant to help with data (de-)serialization workflows.
kw_only=Truenow works on Python 2.
raise fromnow works on frozen classes on PyPy.
frozenset\ s like
set\ s with regards to the retain_collection_types argument.
- The type stubs for
attr.make_class()are not missing the collect_by_mro argument anymore.