Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): Update stamina requirement from ~=24.1.0 to ~=24.2.0 #342

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 5, 2024

Updates the requirements on stamina to permit the latest version.

Release notes

Sourced from stamina's releases.

24.2.0

Highlights

This release adds two handy classes for the cases when you just want to retry a single function/method call:

def do_something_with_url(url, some_kw):
    resp = httpx.get(url)
    resp.raise_for_status()
    ...
rc = stamina.RetryingCaller(attempts=5)
rc(httpx.HTTPError, do_something_with_url, f"https://httpbin.org/status/404", some_kw=42)
You can also create a caller with a pre-bound exception type:
bound_rc = rc.on(httpx.HTTPError)
bound_rc(do_something_with_url, f"https://httpbin.org/status/404", some_kw=42)

Both rc and bound_rc run:

do_something_with_url(f"https://httpbin.org/status/404", some_kw=42)

Unfortunately, it's not possible to implement this behavior transparently for async, so you have to use AsyncRetryingCaller for async callables.

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), Daniel Fortunov (@asqui), Kevin P. Fleming (@kpfleming), and Sören Weber (@SoerenWeber).

Maintenance Sustainers

Adam Hill (@adamghill), Dan Groshev (@si14), Magnus Watn (@magnuswatn), David Cramer (@dcramer), Moving Content AG (@moving-content), ProteinQure (@ProteinQure), Jesse Snyder (@jessesnyder), Rivo Laks (@rivol), Ionel Cristian Mărieș (@ionelmc), The Westervelt Company (@westerveltco), Philippe Galvan (@PhilippeGalvan), Birk Jernström (@birkjernstrom), Tim Schilling (@tim-schilling), Chris Withers (@cjw296), Christopher Dignam (@chdsbd), Stefan Hagen (@sthagen), Sławomir Ehlert (@slafs), Mostafa Khalil (@khadrawy), Filip Mularczyk (@mukiblejlok), Mike Fiedler (@miketheman), and Michel Vittória (@michelvittoria).

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

Full Changelog

... (truncated)

Changelog

Sourced from stamina's changelog.

24.2.0 - 2024-01-31

Added

  • stamina.RetryingCaller and stamina.AsyncRetryingCaller that allow even easier retries of single callables: stamina.RetryingCaller(attempts=5).on(ValueError)(do_something, "foo", bar=42) and stamina.RetryingCaller(attempts=5)(ValueError, do_something, "foo", bar=42) will call do_something("foo", bar=42) and retry on ValueError up to 5 times.

    stamina.RetryingCaller and stamina.AsyncRetryingCaller take the same arguments as stamina.retry(), except for on that can be bound separately.

    #56 #57

24.1.0 - 2024-01-03

Fixed

  • stamina doesn't retry successful blocks when it's deactivated anymore (yes, you read it right). #54

23.3.0 - 2023-12-05

Added

23.2.0 - 2023-10-30

Added

  • Instrumentation is now pluggable! You can define your own hooks that are run with retry details whenever a retry is scheduled. The documentation now has a whole chapter on instrumentation. #37

  • If structlog is not installed, the scheduled retry is now logged using the standard library logging module by default. #35

Changed

  • Tenacity's internal AttemptManager object is no longer exposed to the user. This was an oversight and never documented. stamina.retry_context() now yields instances of stamina.Attempt. #22

  • Initialization of instrumentation is now delayed. This means that if there's no retries, there's no startup overhead from importing structlog and prometheus-client.

... (truncated)

Commits

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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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 dependabot bot added the pip dependencies Python Packages label Feb 5, 2024
Updates the requirements on [stamina](https://github.com/hynek/stamina) to permit the latest version.
- [Release notes](https://github.com/hynek/stamina/releases)
- [Changelog](https://github.com/hynek/stamina/blob/main/CHANGELOG.md)
- [Commits](hynek/stamina@24.1.0...24.2.0)

---
updated-dependencies:
- dependency-name: stamina
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/stamina-approx-eq-24.2.0 branch from 06a2dac to f236871 Compare February 5, 2024 20:01
Copy link

sonarcloud bot commented Feb 5, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Owner

@edgarrmondragon edgarrmondragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dependabot merge

@dependabot dependabot bot merged commit 5eb19a2 into main Feb 5, 2024
12 checks passed
@dependabot dependabot bot deleted the dependabot/pip/stamina-approx-eq-24.2.0 branch February 5, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pip dependencies Python Packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant