unstale

pypi / tenacity

tenacity

What changed in tenacity 9, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.

1 breaking1 deprecations3 new APIs and options22 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

tenacity 927 changes

Breaking changes 1

Deprecations 1

New APIs and options 3

  • AttemptManager supports use as an async context manager.

    9.2.0release notes

  • Retrying accepts a name parameter to produce more meaningful log output.

    9.2.0release notes

  • wait_exponential_jitter adds a min parameter and supports timedelta values.

    9.2.0release notes

Fixes and other changes 22

  • Restores support for combining a callable and a strategy.

    9.2.1release notes

  • The direct-call path now respects enabled=False.

    9.2.1release notes

  • Annotates __radd__ as taking the int seed from sum(), correcting its type signature.

    9.2.1release notes

  • Restores support for falsy wait values.

    9.2.1release notes

  • after_log now guards against seconds_since_start being None.

    9.2.0release notes

  • delay_since_first_attempt is initialized in statistics when begin() runs.

    9.2.0release notes

  • An enabled parameter disables retrying when set to False, including through iterator protocols.

    9.2.0release notes

  • Retrying no longer hangs on cyclic exception __cause__ chains.

    9.2.0release notes

  • Underflow in the exponential wait threshold is avoided.

    9.2.0release notes

  • func.retry.statistics stays synchronized with the copy's statistics.

    9.2.0release notes

  • LoggerProtocol is now compatible with logging.Logger.

    9.2.0release notes

  • Ordinal suffixes are generated correctly for large numbers ending in 11, 12, or 13.

    9.2.0release notes

  • Static typing of @retry-decorated instance methods is fixed.

    9.2.0release notes

  • The .retry, .statistics, and .retry_with attributes are exposed to type checkers.

    9.2.0release notes

  • Plain function composition with retry_base using | and & works again.

    9.2.0release notes

  • retry_if_exception_message accepts an empty message.

    9.2.0release notes

  • Retrying and retry strategies can be pickled for multiprocessing.

    9.2.0release notes

  • Statistics remain visible when a function decorated with @retry is wrapped further.

    9.2.0release notes

  • Tracebacks are formatted inline for loguru compatibility.

    9.2.0release notes

  • When TryAgain wraps a cause, the underlying exception is reraised.

    9.2.0release notes

  • An empty strategy list is rejected with ValueError instead of IndexError.

    9.2.0release notes

  • Fixed annotations for retry() when using an async sleep= function.

    9.1.4release notes