attr.define(), attr.frozen(), attr.mutable(), and attr.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 correct 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 the attr.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 of attr.Attribute. #684
zope.interface is now a "soft dependency" when running the test suite; if zope.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
attr.define(), attr.frozen(), attr.mutable(), and attr.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 correct 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 the attr.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 of attr.Attribute. #684
zope.interface is now a "soft dependency" when running the test suite; if zope.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
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.
If all status checks pass Dependabot will automatically merge this pull request.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will 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 version` will 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 dependency` will 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 labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will 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](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps attrs from 20.1.0 to 20.2.0.
Release notes
Sourced from attrs's releases.
Changelog
Sourced from attrs's changelog.
Commits
4f74fba
Prepare 20.2.074605de
Elaborate more on #684ea04c15
Drop superfluous word060d1ef
Add newsfragment on state of NG APIsc454722
Fix typo504eefe
NG: make frozen classes comfortably subclassable (#687)4875590
Don't reset custom setattr in slotted classes (#681)bfd7bb4
Ignore inherited field when comparing Attributes (#684)dfb2ee2
Makezope
a semi-optional test dependency (#685)00c1c2c
Add check-toml hookDependabot 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
.If all status checks pass Dependabot will automatically merge this pull request.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will 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 version` will 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 dependency` will 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 labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will 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](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)