github python-attrs/attrs 24.3.0

23 hours ago

Highlights

Mostly bug fixes and adjustments, but also support for Python 3.13's copy.replace(). On the other side we say goodbye to Python 3.7.

Full changelog below!

Special Thanks

This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If you would like to join them, go to https://github.com/sponsors/hynek and check out the sweet perks!

Above and Beyond

Variomedia AG (@variomedia), Tidelift (@tidelift), thanks.dev (@thnxdev), Klaviyo (@klaviyo), FilePreviews (@filepreviews), Privacy Solutions GmbH (@privacy-solutions), Daniel Fortunov (@asqui), Kevin P. Fleming (@kpfleming), and Polar (@polarsource).

Maintenance Sustainers

Buttondown (@buttondown), Konstantin Vinogradov (@vinogradovkonst), Christopher Dignam (@chdsbd), Stefan Hagen (@sthagen), Magnus Watn (@magnuswatn), David Cramer (@dcramer), Jesse Snyder (@jessesnyder), Rivo Laks (@rivol), Chris Withers (@cjw296), Mike Fiedler (@miketheman), Duncan Hill (@cricalix), Colin Marquardt (@cmarqu), Pieter Swinkels (@swinkels), Nick Libertini (@libertininick), Moving Content AG (@moving-content), ProteinQure (@ProteinQure), The Westervelt Company (@westerveltco), Sławomir Ehlert (@slafs), Mostafa Khalil (@khadrawy), Filip Mularczyk (@mukiblejlok), Thomas Klinger (@thmsklngr), Andreas Poehlmann (@ap--), August Bigelow (@atbigelow), Carlton Gibson (@carltongibson), and Roboflow (@roboflow).

Not to forget 9 more amazing humans who chose to be generous but anonymous!

Full Changelog

Backwards-incompatible Changes

  • Python 3.7 has been dropped. #1340

Changes

  • Introduce attrs.NothingType, for annotating types consistent with attrs.NOTHING. #1358
  • Allow mutating __suppress_context__ and __notes__ on frozen exceptions. #1365
  • attrs.converters.optional() works again when taking attrs.converters.pipe() or another Converter as its argument. #1372
  • attrs instances now support copy.replace(). #1383
  • attrs.validators.instance_of()'s type hints now allow for union types. For example: instance_of(str | int) #1385

This release contains contributions from @dwgrth, @esteevens, @filbranden, @geofft, @graingert, @hynek, @mschoettle, @Tinche, @tjstum, and @webknjaz.

Artifact Attestations

You can verify this release's artifact attestions using GitHub's CLI tool by downloading the sdist and wheel from PyPI and running:

$ gh attestation verify --owner python-attrs attrs-24.3.0.tar.gz

and

$ gh attestation verify --owner python-attrs attrs-24.3.0-py3-none-any.whl

Don't miss a new attrs release

NewReleases is sending notifications on new releases.