Added a new stop function: stop_before_delay, which will stop execution if the next sleep time would cause overall delay to exceed the specified delay. Useful for use cases where you have some upper bound on retry times that you must not exceed, so returning before that timeout is preferable than returning after that timeout.
Bug Fixes
Preserve defaults and kwdefaults through retry decorator
Other Notes
Add a "test" extra
Commits
a15fa64 fix: Avoid overwriting local contexts with retry decorator (#479)
ee6a8f7 Include tenacity.asyncio subpackage in release dist (#474)
702014b ci: add support for trio in Mergify automerge (#470)
ade0567 Support Trio out-of-the-box, take 2 (#463)
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 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)
Bumps tenacity from 8.2.3 to 8.4.2.
Release notes
Sourced from tenacity's releases.
Commits
a15fa64
fix: Avoid overwriting local contexts with retry decorator (#479)ee6a8f7
Includetenacity.asyncio
subpackage in release dist (#474)702014b
ci: add support for trio in Mergify automerge (#470)ade0567
Support Trio out-of-the-box, take 2 (#463)952189b
Update index.rst: Remove * (#465)5b00c15
chore(deps): bump the github-actions group across 1 directory with 2 updates ...21137e7
Add async strategies (#451)cb15300
Lazy import asyncio.sleep as it's expensive (#450)c5d2d8b
ci: refactor Mergify rules (#447)06c34a2
chore: update to latest ruff (#448)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