Back to Explore

jd/tenacity

GitHub
1 watchersOpen source

Last release: 2026-02-07

Tenacity is a Python library (hosted on GitHub) for adding retry logic to code. It’s useful when you need operations to automatically retry after failures, typically to make programs more resilient to transient errors.

Project status

  • Actively maintained: The upstream GitHub activity shows a push on 2026-06-03, and there were recent library updates in February 2026 (9.1.3, 9.1.4), indicating the project is still under active development rather than dormant.
  • Update cadence (apparent): There was a tight burst in early February 2026 (9.1.3 on 2026-02-05, 9.1.4 on 2026-02-07). After that, there is a gap until the next recorded upstream push in June 2026, but no additional published updates are shown after 9.1.4 in the provided history.

AI summary generated 2026-06-09

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 9.1.4

    2026-02-07

    Release 9.1.4 is a small, typing-focused patch for Tenacity. It improves the `@retry` decorator annotations for async `sleep=` callables, especially cases like `sleep=trio.sleep`, and does not appear to change runtime retry behavior.

  • 9.1.3

    2026-02-05

    Release 9.1.3 adds the new `wait_exception` wait strategy, adds Python 3.14 support, and drops Python 3.9. It also fixes async retry behavior when an async sleep callable is used with a synchronous function, and broadens logger typing for the logging helpers.

    BreakingFeatures
  • 9.1.2

    2025-04-02

    Release 9.1.2 appears to be a maintenance release with no substantive documented notes. The only code change is in the GitHub release workflow, where the package is now explicitly built into source and wheel distributions before publishing to PyPI.

  • 9.1.1

    2025-04-02

    Release 9.1.1 is a small maintenance release focused on CI, packaging, and retry matcher behavior. It adds Python 3.13 testing, drops Python 3.8 support in packaging and test tooling, switches release publishing to GitHub trusted publishing, and updates retry helpers to work with compiled regular expressions and a more precise Self return type.

    BreakingFeatures
  • 9.0.0

    2024-07-29

    Tenacity 9.0.0 is a small release focused on fixing `wait_random_exponential` so it respects the configured `min` value, plus a major-version bump to signal API breakage around the `statistics` attribute. The code changes are narrowly scoped, with the main behavior change in retry backoff calculation and additional tests to cover the new minimum-bound behavior.

    Breaking
  • 8.5.0

    2024-07-05

    Tenacity 8.5.0 is a focused fix release that restores the wrapped function's `retry` attribute so it points at the underlying retry controller again. The docs and tests now emphasize reading execution statistics from `function.statistics`, and patching `function.retry` for temporary behavior changes such as overriding `wait` or `stop`.

  • 8.4.2

    2024-06-24

    Tenacity 8.4.2 is a focused bugfix release aimed at preserving local contexts during retry handling, especially in reentrant or nested usage of the same decorated function. The implementation changes both sync and async retry wrappers to use a fresh retry copy on each invocation, and adds regression coverage for the issue.

  • 8.4.1

    2024-06-17

    This release is a packaging-only update for tenacity 8.4.1. It fixes the distribution configuration so the `tenacity.asyncio` subpackage is included in published release artifacts.

  • 8.4.0

    2024-06-17

    tenacity 8.4.0 adds first-class async retry strategy support and automatic Trio compatibility. The code diff shows a broader async refactor than the release notes spell out, including a new async retry module, async-aware callback handling, and improved coroutine detection.

    Features
  • 8.3.0

    2024-05-07

    Release 8.3.0 adds a new retry stop function, stop_before_delay, to allow returning early when the next sleep would exceed a configured delay budget. It also fixes the retry decorator behavior to preserve function defaults (__defaults__ and __kwdefaults__).

    Features