Work in progress.
Release highlights:
- A
UserWarning
will be raised whenevermax_calls_total
is lower than 2.
Released 2023-10-06.
Breaking changes:
DoCall
,DoWait
andRetryState
have been removed. They have been replaced byBackoffCalculator
. This class exposes a methodget_backoff
. This method should return either afloat
representing the time to wait orNone
if there should be no more retries/waits.- Python 3.8+ is now required to run
opnieuw
.
Release highlights:
- Remove
DoCall
,DoWait
andRetryState
. - Use
BackoffCalculator
to keep track of the time to wait between retries and refactor retrying logic accordingly. - Add chaining of previously retried exceptions.
opnieuw
will now correctly set the__cause__
attribute of any exception leaving the decorator with a chain of all the previously retried exceptions. - Python 3.8+ is now required to run
opnieuw
.
Released 2022-05-18.
Breaking changes:
clock.TestClock
was renamed toclock.DummyClock
.
Release highlights:
- Rename
clock.TestClock
toclock.DummyClock
. - Relint and upgrade the codebase.
- Fix a typing issues for
retry_async
.
Released 2023-05-04.
Release highlights:
- Use more modern typing concepts such as
ParamSpec
.
Released 2022-05-18.
Breaking changes:
RetryState
namespaces are now context-local instead of global. This ensures that modifying the retry behavior doesn't bleed unexpectedly when used in concurrent code.
Release highlights:
- Expose
replace_retry_state
context manager to customize the retry behavior for a specific namespace. - Add
util.no_retries
context manager to disable retries for a specific namespace.
Released 2020-05-08.
Breaking changes:
- None.
Release highlights:
- Prevent waiting while running tests via
test_util.retry_immediately
Released 2020-04-07.
Breaking changes:
- None.
Release highlights:
- Expose type information via PEP-561.
- Support running retry with
max_calls_total=1
- @ierror
Initial (pre)release. See the blogpost to learn more.