Skip to content

v4.4.5

Latest

Choose a tag to compare

@Llucs Llucs released this 04 Aug 03:03
· 5 commits to main since this release
7afb17e

4.4.5 - 2026-08-03

  • Fix ThreadPoolExecutor leak on the exception path when attempt_timeout is set (#36). The executor created per attempt was only shut down on the timeout path, leaking worker threads whenever the target raised an exception. _retry_loop_sync now wraps the executor in try/finally so _executor.shutdown(wait=False) runs on every code path (success, timeout, and exception).
  • Fix handler details dict always containing empty args and kwargs (#73). The real call arguments were never threaded into RetryState/RetryCallState, so handlers reading details["args"]/details["kwargs"] (e.g. details["kwargs"]["query_id"]) got ()/{} and raised KeyError. args/kwargs are now plumbed from every entry point (on_exception/on_predicate sync+async, sync/async generators, Retrying.call/async_call, RetryingCaller/AsyncRetryingCaller, hedge) into the retry loop, and RetryState/RetryCallState are constructed with them so every handler (on_attempt, on_backoff, on_giveup, on_success, before, after, before_sleep) receives the actual call arguments.
  • Add regression tests for both issues: executor thread leak (decorator, functional API, RetryingCaller, success path) and handler details args/kwargs (sync+async, generators, Retrying/RetryingCaller/AsyncRetryingCaller, on_backoff/on_giveup/on_success/on_attempt/before/after/before_sleep), including the KeyError reproduction from the issue.