github python-attrs/attrs 25.2.0

19 hours ago

Highlights

Vroom–vroom edition! attrs had always impressive runtime performance because we generate optimal code for your configuration. But now, said code generation is 30–50% faster, too!

This is the last attrs version to support Python 3.8.

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), Ecosystems (@ecosyste-ms), Klaviyo (@klaviyo), Privacy Solutions GmbH (@privacy-solutions), FilePreviews (@filepreviews), nate nowack (@zzstoatzz), Daniel Fortunov (@asqui), and Kevin P. Fleming (@kpfleming).

Maintenance Sustainers

Buttondown (@buttondown), Christopher Dignam (@chdsbd), Magnus Watn (@magnuswatn), David Cramer (@dcramer), Jesse Snyder (@jessesnyder), Rivo Laks (@rivol), Polar (@polarsource), Mike Fiedler (@miketheman), Duncan Hill (@cricalix), Colin Marquardt (@cmarqu), Pieter Swinkels (@swinkels), Nick Libertini (@libertininick), Brian M. Dennis (@crossjam), 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 Trapper Bigelow (@atbigelow), Carlton Gibson (@carltongibson), and Roboflow (@roboflow).

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

Full Changelog

Changes

  • Checking mandatory vs non-mandatory attribute order is now performed after the field transformer, since the field transformer may change attributes and/or their order. #1147
  • attrs.make_class() now allows for Unicode class names. #1406
  • Speed up class creation by 30%-50% by compiling methods only once and using a variety of other techniques. #1407
  • The error message if an attribute has both an annotation and a type argument will now disclose what attribute seems to be the problem. #1410

This release contains contributions from @frenzymadness, @hynek, @jamesmurphy-mc, @serge-sans-paille, @Tinche, 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-25.2.0.tar.gz

and

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

Don't miss a new attrs release

NewReleases is sending notifications on new releases.