Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==20.1.0
->==20.3.0
Release Notes
python-attrs/attrs
v20.3.0
Compare Source
Backward-incompatible Changes
attr.define()
,attr.frozen()
,attr.mutable()
, andattr.field()
remain provisional.This release does not 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 into your project.
Feel free to provide feedback to them in the linked issue #668.
We will release the
attrs
namespace once we have the feeling that the APIs have properly settled.#668
Changes
attr.s()
now has a field_transformer hook that is called for allAttribute
s and returns a (modified or updated) list ofAttribute
instances.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.
#653
kw_only=True
now works on Python 2.#700
raise from
now works on frozen classes on PyPy.#703,
#712
attr.asdict()
andattr.astuple()
now treatfrozenset
s likeset
s with regards to the retain_collection_types argument.#704
attr.s()
andattr.make_class()
are not missing the collect_by_mro argument anymore.#711
v20.2.0
Compare Source
Backward-incompatible Changes
attr.define()
,attr.frozen()
,attr.mutable()
, andattr.field()
remain provisional.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 into your project.
Feel free to provide feedback to them in the linked issue #668.
We will release the
attrs
namespace once we have the feeling that the APIs have properly settled.#668
Changes
attr.define()
et al now correctly detect__eq__
and__ne__
.#671
attr.define()
et al's hybrid behavior now also works correctly when arguments are passed.#675
It's possible to define custom
__setattr__
methods on slotted classes again.#681
In 20.1.0 we introduced the
inherited
attribute on theattr.Attribute
class 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.Attribute
though, because when sub-classing, attributes from base classes are suddenly not equal to themselves in a super class.Therefore the
inherited
attribute will now be ignored when hashing and comparing instances ofattr.Attribute
.#684
zope.interface
is now a "soft dependency" when running the test suite; ifzope.interface
is not installed when running the test suite, the interface-related tests will be automatically skipped.#685
The ergonomics of creating frozen classes using
@define(frozen=True)
and sub-classing frozen classes has been improved:you don't have to set
on_setattr=None
anymore.#687
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.