attrs v20.2.0 Release NotesRelease Date: 2020-09-05 // about 2 years ago
This release fixes a bunch of bugs and ergonomics but they remain mostly unchanged.
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.define()et al now correctly detect
attr.define()et al's hybrid behavior now also works correctly when arguments are passed.
- It's possible to define custom
__setattr__methods on slotted classes again.
- In 20.1.0 we introduced the
inheritedattribute on the
attr.Attributeclass to differentiate attributes that have been inherited and those that have been defined directly on the class.
It has shown to be problematic to involve that attribute when comparing instances of
attr.Attributethough, because when sub-classing, attributes from base classes are suddenly not equal to themselves in a super class.
inheritedattribute will now be ignored when hashing and comparing instances of
zope.interfaceis now a "soft dependency" when running the test suite; if
zope.interfaceis not installed when running the test suite, the interface-related tests will be automatically skipped.
- The ergonomics of creating frozen classes using
@define(frozen=True)and sub-classing frozen classes has been improved: you don't have to set