chore(deps): update dependency attrs to v21.4.0 #229
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:
==21.2.0
->==21.4.0
Release Notes
python-attrs/attrs (attrs)
v21.4.0
Compare Source
Changes
cloudpickle
does not work.#892
coverage report
for projects that useattrs
and don't set a--source
.#895,
#896
v21.3.0
Compare Source
Backward-incompatible Changes
When using
@define
, converters are now run by default when setting an attribute on an instance -- additionally to validators.I.e. the new default is
on_setattr=[attrs.setters.convert, attrs.setters.validate]
.This is unfortunately a breaking change, but it was an oversight, impossible to raise a
DeprecationWarning
about, and it's better to fix it now while the APIs are very fresh with few users.#835,
#886
import attrs
has finally landed!As of this release, you can finally import
attrs
using its proper name.Not all names from the
attr
namespace have been transferred; most notablyattr.s
andattr.ib
are missing.See
attrs.define
andattrs.field
if you haven't seen our next-generation APIs yet.A more elaborate explanation can be found On The Core API Names
This feature is at least for one release provisional.
We don't plan on changing anything, but such a big change is unlikely to go perfectly on the first strike.
The API docs have been mostly updated, but it will be an ongoing effort to change everything to the new APIs.
Please note that we have not moved -- or even removed -- anything from
attr
!Please do report any bugs or documentation inconsistencies!
#887
Changes
attr.asdict(retain_collection_types=False)
(default) dumps collection-esque keys as tuples.#646,
#888
__match_args__
are now generated to support Python 3.10'sStructural Pattern Matching.
This can be controlled by the
match_args
argument to the class decorators on Python 3.10 and later.On older versions, it is never added and the argument is ignored.
#815
attrs.setters.validate
(default in@define
and@mutable
) but no field defines a validator, pretend that it's not set.#817
__repr__
is significantly faster on Pythons with f-strings.#819
field_transformer
are wrapped withAttrsClass
again.#824
#828
attrs.converters.to_bool()
.#830
attrs.resolve_types()
now resolves types of subclasses after the parents are resolved.#842
#843
lt(val)
(< val),le(va)
(≤ val),ge(val)
(≥ val),gt(val)
(> val), andmaxlen(n)
.#845
attrs
classes are now fully compatible with cloudpickle (no need to disablerepr
anymore).#857
attrs.validators.disabled()
and functionsattrs.validators.(set|get)_disabled()
.They deprecate
attrs.(set|get)_run_validators()
.All functions are interoperable and modify the same internal state.
They are not – and never were – thread-safe, though.
#859
attrs.validators.matches_re()
now accepts pre-compiled regular expressions in addition to pattern strings.#877
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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.