taskd-client-py
taskd-client-py copied to clipboard
Bump attrs from 20.3.0 to 21.2.0
Bumps attrs from 20.3.0 to 21.2.0.
Release notes
Sourced from attrs's releases.
21.2.0
Yesterday's 21.1.0 has unfortunately two regressions that we're fixing with today's 21.2.0 release:
- The new recursive mode for
attr.evolve()broke some use cases.attrsis not importable under Python 3.4 anymore. While 3.4 hasn't been supported for a while now, we don't want it throw errors after installation.We've reverted the changes to
attr.evolve()and added packaging metadata blocking Python 3.4.Additionally, we are yanking 21.1.0 from PyPI. If you've pinned
attrsto 21.1.0, this does not affect you in any way.21.1.0
I am extremely excited to announce the release of attrs 21.1.0.
attrs is the direct ancestor of – and the inspiration for – dataclasses in the standard library and remains the more powerful option for creating regular classes without getting bogged down with writing identical boilerplate again and again: https://www.attrs.org/
Heartfelt thanks go to my generous GitHub sponsors, companies subscribing to attrs on Tidelift, and people who bought me a coffee on Ko-fi! Support like that makes me work on FOSS on a Saturday afternoon – especially when a release drags itself like this one! <3
While this release took a bit longer than I wished for, it comes with many exciting changes. The highlights alone are longer than a usual changelog:
The next-generation APIs (
@attr.define,@attr.mutable,@attr.frozen,@attr.field) are deemed stable now. The old ones aren't going anywhere, but I encourage you to check the new ones out – they're much nicer!pyright and pylance support: Eric Traut of Microsoft was kind enough to involve me in their work on the dataclass_transforms spec.
As a result, Microsoft's type checker pyright will work with this attrs release, and so will their Python language server pylance which should be exciting to VS Code users.
Currently it only supports a subset of attrs's features, but it's the most important ones and more will most likely follow. Some of the limitations are documented in our documentation on type annotations.
Customization of field comparison. This is something especially NumPy users have been asking for for a long time: you can now fully customize how a field is compared. We also ship a helper to avoid boilerplate code. So if you'd like to have an object with a NumPy array that compares correctly, this is the way:
import attr import numpy
@attr.define class C: an_array = attr.field(eq=attr.cmp_using(eq=numpy.array_equal))Check out the new documentation on comparison for details.
To make it more ergonomic, I've decided to un-deprecate the
cmpargument again, so you can customizeeqandorderin one go. Sorry about the trouble! Thecmpattribute remains deprecated.New powerful
__init__helpers:
- If attrs deduces you don't want it to write a
__init__for you, it will create an__attrs_init__instead that you can call from your custom__init__.- If attrs finds a
__attrs_pre_init__, it will call it without any arguments before doing any initializations. This is really only useful if you want to runsuper().__init__(), but that's a use-case people have asked for for years!See Hooking Yourself Into Initialization for details.
In preparation for the (rescinded) plan to make
from __future__ import annotationsthe default in Python 3.10,attr.resolve_types()can now also be used to resolve types inside offield_transformers.A Look Ahead
For the next release we've got even bigger plans! By stabilizing the next-generation APIs we can finally go the last step, I've been talking for years (yeah, sorry):
import attrs.
... (truncated)
Changelog
Sourced from attrs's changelog.
21.2.0 (2021-05-07)
Backward-incompatible Changes
- We had to revert the recursive feature for
attr.evolve()because it broke some use-cases -- sorry! #806- Python 3.4 is now blocked using packaging metadata because
attrscan't be imported on it anymore. To ensure that 3.4 users can keep installingattrseasily, we will yank 21.1.0 from PyPI. This has no consequences if you pinattrsto 21.1.0. #807
21.1.0 (2021-05-06)
Deprecations
The long-awaited, much-talked-about, little-delivered
import attrsis finally upon us!Since the NG APIs have now been proclaimed stable, the next release of
attrswill allow you to actuallyimport attrs. We're taking this opportunity to replace some defaults in our APIs that made sense in 2015, but don't in 2021.So please, if you have any pet peeves about defaults in
attrs's APIs, now is the time to air your grievances in #487! We're not gonna get such a chance for a second time, without breaking our backward-compatibility guarantees, or long deprecation cycles. Therefore, speak now or forever hold you peace! #487The cmp argument to
attr.s()and attr.ib() has been undeprecated It will continue to be supported as syntactic sugar to set eq and order in one go.I'm terribly sorry for the hassle around this argument! The reason we're bringing it back is it's usefulness regarding customization of equality/ordering.
The
cmpattribute and argument onattr.Attributeremains deprecated and will be removed later this year. #773Changes
It's now possible to customize the behavior of
eqandorderby passing in a callable. #435, #627The instant favorite next-generation APIs are not provisional anymore!
They are also officially supported by Mypy as of their 0.800 release.
We hope the next release will already contain an (additional) importable package called
attrs. #668, #786If an attribute defines a converter, the type of its parameter is used as type annotation for its corresponding
__init__parameter.If an
attr.converters.pipeis used, the first one's is used. #710Fixed the creation of an extra slot for an
attr.ibwhen the parent class already has a slot with the same name. #718
__attrs__init__()will now be injected ifinit=False, or ifauto_detect=Trueand a user-defined__init__()exists.This enables users to do "pre-init" work in their
__init__()(such assuper().__init__()).
__init__()can then delegate constructor argument processing toself.__attrs_init__(*args, **kwargs). #731
bool(attr.NOTHING)is nowFalse. #732It's now possible to use
super()inside of properties of slotted classes. #747Allow for a
__attrs_pre_init__()method that -- if defined -- will get called at the beginning of theattrs-generated__init__()method. #750Added forgotten
attr.Attribute.evolve()to type stubs. #752
... (truncated)
Commits
83d3cd7Prepare 21.2.0f83dabbThat comma is not necessary744a790Clarify yanking of 21.18076287Create 807.breaking.rst966c220Declare Python 3.4 as incompatible (#807)f10d050Revert recursive evolve (#806)24a2c1eStart new cycleb22195ePrepare 21.1.0c5ae43fPin towncrier503164fFix changelog template for towncrier 21.3.0- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)