Skip to content

24.3.0

Latest
Compare
Choose a tag to compare
@hynek hynek released this 27 Aug 14:53
· 19 commits to main since this release
24.3.0
ffc07c7

Highlights

Three changes, three highlights! stamina now allows you to test your retry logic, by limit the number of retries, you can specify a callable that decides whether you, indeed want to retry on a certain exception (think: different HTTP errors), and finally there's more info on the Attempt object.

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), FilePreviews (@filepreviews), Klaviyo (@klaviyo), Daniel Fortunov (@asqui), Kevin P. Fleming (@kpfleming), and Wim Jeantine-Glenn (@wimglenn).

Maintenance Sustainers

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

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

Full Changelog

Added

  • The on argument in all retry functions now can be a callable that takes an exception and returns a bool which decides whether or not a retry should be scheduled. #70

  • stamina.Attempt now has a next_wait attribute that contains the time the next backoff will wait, if the current attempt fails (sans jitter). #72

  • It is now possible to switch stamina into a testing mode using stamina.set_testing(). It disables backoffs and caps the number of retries. #73


This release contains contributions from @gsakkis, @hynek, and @wlach.

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 hynek stamina-24.3.0.tar.gz

and

$ gh attestation verify --owner hynek stamina-24.3.0-py3-none-any.whl