Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bibliography

This bibliography presents works for the following uses:

  • To fact check claims made in this manual.
  • To provide further guidance in cases this manual doesn't address.
  • To supply context about attempt's design.

Tenacity

Tenacity is a Python library for retrying. It is the primary inspiration for attempt's design.

Tenacity forked from Retrying in 2016 as it's original author and maintainer, Ray Holder, stopped responding to members of the community who reached out. Holder wrote Retrying in 2013.

Retrying is currently maintained by Greg Roodt in a seperate fork. Roodt organized the transfer of the retrying package name name in 2022. He attempting to transfer the name to Tenacity, but while he succeeded in taking over the name, the issue to transfer ownership to Tenacity was not followed up on. It remains open at the time of this writing. Roodt's fork recieves periodic updates.

Retrying established the core concepts of the architecture:

  • An @retry(...) decorator which retries a wrapped function
  • Three categories of rules, which together for the retrying strategy
    • Retry rules, determining which circumstances result in a retry
    • Stop rules, determining which cirucmstances terminate retrying
    • Wait rules, determining how long we sleep after an attempt

Retrying baked it's predicates into the arguments of the @retry(...) decorator, much like attempt.

Tenacity extended the architecture to support functions as arguments, unlocking arbitrary predicates, and to use context managers in addition to decorators. It added support for async contexts. Tenacity has also created a large library of utilities and extensive documentation.

References

Case studies