[PR #15] [CLOSED] Bump attrs from 20.3.0 to 21.2.0 #64

Closed
opened 2026-09-02 13:09:11 +02:00 by TheLovinator · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheLovinator1/discord-twitter-webhooks/pull/15
Author: @dependabot[bot]
Created: 5/7/2021
Status: Closed

Base: masterHead: dependabot/pip/attrs-21.2.0


📝 Commits (1)

  • 6f459f4 Bump attrs from 20.3.0 to 21.2.0

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 requirements.txt (+1 -1)

📄 Description

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.
  • attrs is 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 attrs to 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 cmp argument again, so you can customize eq and order in one go. Sorry about the trouble! The cmp attribute remains deprecated.

  • New powerful __init__ helpers:

    1. 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__.
    2. 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 run super().__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 annotations the default in Python 3.10, attr.resolve_types() can now also be used to resolve types inside of field_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](https://github.com/python-attrs/attrs/issues/806) <https://github.com/python-attrs/attrs/issues/806>_
  • Python 3.4 is now blocked using packaging metadata because attrs can't be imported on it anymore. To ensure that 3.4 users can keep installing attrs easily, we will yank <https://pypi.org/help/#yanked>_ 21.1.0 from PyPI. This has no consequences if you pin attrs to 21.1.0. [#807](https://github.com/python-attrs/attrs/issues/807) <https://github.com/python-attrs/attrs/issues/807>_

21.1.0 (2021-05-06)

Deprecations ^^^^^^^^^^^^

  • The long-awaited, much-talked-about, little-delivered import attrs is finally upon us!

    Since the NG APIs have now been proclaimed stable, the next release of attrs will allow you to actually import 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! [#487](https://github.com/python-attrs/attrs/issues/487) <https://github.com/python-attrs/attrs/issues/487>_

  • The 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 cmp attribute and argument on attr.Attribute remains deprecated and will be removed later this year. [#773](https://github.com/python-attrs/attrs/issues/773) <https://github.com/python-attrs/attrs/issues/773>_

Changes ^^^^^^^

  • It's now possible to customize the behavior of eq and order by passing in a callable. [#435](https://github.com/python-attrs/attrs/issues/435) <https://github.com/python-attrs/attrs/issues/435>, [#627](https://github.com/python-attrs/attrs/issues/627) <https://github.com/python-attrs/attrs/issues/627>
  • The instant favorite next-generation APIs <https://www.attrs.org/en/stable/api.html#next-gen>_ are not provisional anymore!

... (truncated)

Commits

Dependabot compatibility score

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 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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheLovinator1/discord-twitter-webhooks/pull/15 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 5/7/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dependabot/pip/attrs-21.2.0` --- ### 📝 Commits (1) - [`6f459f4`](https://github.com/TheLovinator1/discord-twitter-webhooks/commit/6f459f445eae4e3f9097d340e88fec0c9cb6dd22) Bump attrs from 20.3.0 to 21.2.0 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `requirements.txt` (+1 -1) </details> ### 📄 Description Bumps [attrs](https://github.com/python-attrs/attrs) from 20.3.0 to 21.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/attrs/releases">attrs's releases</a>.</em></p> <blockquote> <h2>21.2.0</h2> <p>Yesterday's 21.1.0 has unfortunately two regressions that we're fixing with today's 21.2.0 release:</p> <ul> <li>The new recursive mode for <code>attr.evolve()</code> broke some use cases.</li> <li><code>attrs</code> is 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.</li> </ul> <p>We've reverted the changes to <code>attr.evolve()</code> and added packaging metadata blocking Python 3.4.</p> <p>Additionally, we are <a href="https://pypi.org/help/#yanked">yanking</a> 21.1.0 from PyPI. If you've pinned <code>attrs</code> to 21.1.0, this does <strong>not</strong> affect you in <em>any</em> way.</p> <h2>21.1.0</h2> <p>I am <em>extremely</em> excited to announce the release of <em>attrs</em> 21.1.0.</p> <p><em>attrs</em> is the direct ancestor of – and the inspiration for – <em>dataclasses</em> 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: <a href="https://www.attrs.org/">https://www.attrs.org/</a></p> <p>Heartfelt thanks go to my generous <a href="https://github.com/sponsors/hynek">GitHub sponsors</a>, companies subscribing to <em>attrs</em> on <a href="https://tidelift.com/subscription/pkg/pypi-attrs">Tidelift</a>, and people who bought me a coffee on <a href="https://ko-fi.com/the_hynek">Ko-fi</a>! Support like that makes me work on FOSS on a Saturday afternoon – especially when a release drags itself like this one! &lt;3</p> <p>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:</p> <ul> <li> <p>The <strong>next-generation APIs</strong> (<code>@attr.define</code>, <code>@attr.mutable</code>, <code>@attr.frozen</code>, <code>@attr.field</code>) are deemed <strong>stable</strong> now. The old ones aren't going anywhere, but I encourage you to check the new ones out – they're much nicer!</p> </li> <li> <p><strong><em>pyright</em> and <em>pylance</em> support</strong>: Eric Traut of Microsoft was kind enough to involve me in their work on the <a href="https://github.com/microsoft/pyright/blob/master/specs/dataclass_transforms.md">dataclass_transforms</a> spec.</p> <p>As a result, Microsoft's type checker <a href="https://github.com/microsoft/pyright"><em>pyright</em></a> will work with this <em>attrs</em> release, and so will their Python language server <a href="https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance"><em>pylance</em></a> which should be exciting to <em>VS Code</em> users.</p> <p>Currently it only supports a subset of <em>attrs</em>'s features, but it's the most important ones and more will most likely follow. Some of the limitations are documented in our <a href="https://www.attrs.org/en/stable/types.html#pyright">documentation on type annotations</a>.</p> </li> <li> <p><strong>Customization of field comparison</strong>. This is something especially <em>NumPy</em> 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 <em>NumPy</em> array that compares correctly, this is the way:</p> <pre lang="python"><code>import attr import numpy <p><a href="https://github.com/attr"><code>@​attr</code></a>.define class C: an_array = attr.field(eq=attr.cmp_using(eq=numpy.array_equal)) </code></pre></p> <p>Check out the <a href="https://www.attrs.org/en/stable/comparison.html">new documentation on comparison</a> for details.</p> </li> <li> <p>To make it more ergonomic, I've decided to <strong>un-deprecate the <code>cmp</code> argument</strong> again, so you can customize <code>eq</code> and <code>order</code> in one go. Sorry about the trouble! The <code>cmp</code> <em>attribute</em> remains deprecated.</p> </li> <li> <p>New powerful <strong><code>__init__</code> helpers</strong>:</p> <ol> <li>If <em>attrs</em> deduces you don't want it to write a <code>__init__</code> for you, it will create an <code>__attrs_init__</code> instead that you can call from your custom <code>__init__</code>.</li> <li>If <em>attrs</em> finds a <code>__attrs_pre_init__</code>, it will call it without any arguments before doing any initializations. This is really only useful if you want to run <code>super().__init__()</code>, but that's a use-case people have asked for for years!</li> </ol> <p>See <a href="https://www.attrs.org/en/latest/init.html#hooking-yourself-into-initialization">Hooking Yourself Into Initialization</a> for details.</p> </li> <li> <p>In preparation for the (rescinded) plan to make <code>from __future__ import annotations</code> the default in <strong>Python 3.10</strong>, <code>attr.resolve_types()</code> can now also be used to resolve types inside of <code>field_transformer</code>s.</p> </li> </ul> <h1>A Look Ahead</h1> <p>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): <code>import attrs</code>.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/attrs/blob/main/CHANGELOG.rst">attrs's changelog</a>.</em></p> <blockquote> <h2>21.2.0 (2021-05-07)</h2> <p>Backward-incompatible Changes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p> <ul> <li>We had to revert the recursive feature for <code>attr.evolve()</code> because it broke some use-cases -- sorry! <code>[#806](https://github.com/python-attrs/attrs/issues/806) &lt;https://github.com/python-attrs/attrs/issues/806&gt;</code>_</li> <li>Python 3.4 is now blocked using packaging metadata because <code>attrs</code> can't be imported on it anymore. To ensure that 3.4 users can keep installing <code>attrs</code> easily, we will <code>yank &lt;https://pypi.org/help/#yanked&gt;</code>_ 21.1.0 from PyPI. This has <strong>no</strong> consequences if you pin <code>attrs</code> to 21.1.0. <code>[#807](https://github.com/python-attrs/attrs/issues/807) &lt;https://github.com/python-attrs/attrs/issues/807&gt;</code>_</li> </ul> <hr /> <h2>21.1.0 (2021-05-06)</h2> <p>Deprecations ^^^^^^^^^^^^</p> <ul> <li> <p>The long-awaited, much-talked-about, little-delivered <code>import attrs</code> is finally upon us!</p> <p>Since the NG APIs have now been proclaimed stable, the <strong>next</strong> release of <code>attrs</code> will allow you to actually <code>import attrs</code>. We're taking this opportunity to replace some defaults in our APIs that made sense in 2015, but don't in 2021.</p> <p>So please, if you have any pet peeves about defaults in <code>attrs</code>'s APIs, <em>now</em> is the time to air your grievances in <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/487">#487</a>! 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! <code>[#487](https://github.com/python-attrs/attrs/issues/487) &lt;https://github.com/python-attrs/attrs/issues/487&gt;</code>_</p> </li> <li> <p>The <em>cmp</em> argument to <code>attr.s()</code> and <code>attr.ib()</code> has been <strong>undeprecated</strong> It will continue to be supported as syntactic sugar to set <em>eq</em> and <em>order</em> in one go.</p> <p>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.</p> <p>The <code>cmp</code> attribute and argument on <code>attr.Attribute</code> remains deprecated and will be removed later this year. <code>[#773](https://github.com/python-attrs/attrs/issues/773) &lt;https://github.com/python-attrs/attrs/issues/773&gt;</code>_</p> </li> </ul> <p>Changes ^^^^^^^</p> <ul> <li>It's now possible to customize the behavior of <code>eq</code> and <code>order</code> by passing in a callable. <code>[#435](https://github.com/python-attrs/attrs/issues/435) &lt;https://github.com/python-attrs/attrs/issues/435&gt;</code><em>, <code>[#627](https://github.com/python-attrs/attrs/issues/627) &lt;https://github.com/python-attrs/attrs/issues/627&gt;</code></em></li> <li>The instant favorite <code>next-generation APIs &lt;https://www.attrs.org/en/stable/api.html#next-gen&gt;</code>_ are not provisional anymore!</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-attrs/attrs/commit/83d3cd70f90a3f4d19ee8b508e58d1c58821c0ad"><code>83d3cd7</code></a> Prepare 21.2.0</li> <li><a href="https://github.com/python-attrs/attrs/commit/f83dabb15ee41431b692c0a380efa52fcb42326d"><code>f83dabb</code></a> That comma is not necessary</li> <li><a href="https://github.com/python-attrs/attrs/commit/744a790756d55b1e4954c4e88b5248db6a4ef3b2"><code>744a790</code></a> Clarify yanking of 21.1</li> <li><a href="https://github.com/python-attrs/attrs/commit/8076287aebaaf8ecd29b536568b00fc6c3726d51"><code>8076287</code></a> Create 807.breaking.rst</li> <li><a href="https://github.com/python-attrs/attrs/commit/966c220e5567f5d5c8dffea98ea19a10b01f4c02"><code>966c220</code></a> Declare Python 3.4 as incompatible (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/807">#807</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/f10d05086417b2e2c3f88ae61384ca4c282c0acc"><code>f10d050</code></a> Revert recursive evolve (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/806">#806</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/24a2c1e7a5b1b1b979a647de2ef36a35ff4c39a1"><code>24a2c1e</code></a> Start new cycle</li> <li><a href="https://github.com/python-attrs/attrs/commit/b22195ee65d5b0ee7694ebd9da7dcd27abafd88c"><code>b22195e</code></a> Prepare 21.1.0</li> <li><a href="https://github.com/python-attrs/attrs/commit/c5ae43f7f2e5cfb88698237ace910a5e6e76b2cf"><code>c5ae43f</code></a> Pin towncrier</li> <li><a href="https://github.com/python-attrs/attrs/commit/503164f57016e54a75bd11535bfe7a70cbc4b9ad"><code>503164f</code></a> Fix changelog template for towncrier 21.3.0</li> <li>Additional commits viewable in <a href="https://github.com/python-attrs/attrs/compare/20.3.0...21.2.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=attrs&package-manager=pip&previous-version=20.3.0&new-version=21.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
TheLovinator 2026-09-02 13:09:11 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TheLovinator/discord-twitter-webhooks#64
No description provided.