Back to Explore

jd/tenacity

GitHub
1 watchersOpen source

Last release: 3 months ago

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: GitHub parser shows recent upstream activity (last push 2026-05-01), and multiple 9.1.x updates in early 2026 indicate ongoing maintenance work rather than a frozen repo.
  • Update cadence: After a gap from 2025-04 (9.1.1, 9.1.2) to 2026-02 (9.1.3, 9.1.4), updates then came close together in February 2026 (9.1.3 on 2026-02-05, 9.1.4 on 2026-02-07), suggesting active development during that window.

AI summary generated 2 weeks ago

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

Recent updates

  • 9.1.4

    3 months ago

    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

    3 months ago

    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

    4/2/2025

    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

    4/2/2025

    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

    7/29/2024

    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

    7/5/2024

    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

    6/24/2024

    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

    6/17/2024

    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

    6/17/2024

    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

    5/7/2024

    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