Skip to content

Migrate from backoff to backon - drop-in replacement, archived upstream #393

Description

@Llucs

Is your feature request related to a problem? Please describe.

The backoff library (litl/backoff) was archived in August 2025 and is no longer maintained. It is also incompatible with Python 3.14+ due to the removal of the deprecated asyncio.iscoroutinefunction() API.

howfairis currently depends on backoff==2.2.* and uses it in 3 files under howfairis/requesting/:

  • get_from_github_no_auth.py
  • get_from_github_with_auth.py
  • get_from_gitlab_no_auth.py

Each uses the same pattern:

from backoff import expo
from backoff import on_exception

@on_exception(expo, RateLimitException, max_tries=8)
def get_from_github_no_auth(url, url_type):
    ...

Describe the solution you would like

Migrate to backon — a modern, actively maintained evolution of backoff. It is a drop-in replacement: change only the import statement in all 3 files.

-from backoff import expo, on_exception
+from backon import expo, on_exception

The dependency change in setup.py:

-"backoff==2.2.*",
+"backon>=4.3.0",

Why backon?

  • Zero dependencies (pure Python, stdlib only)
  • Same public API as backoff — on_exception, on_predicate, expo, fibo, constant, runtime
  • Full type hints
  • Python 3.10+ compatible (including 3.14+)
  • Additional features: circuit breaker, hedging, testing utilities, global toggle
  • Migration is trivial — just the import change

Describe alternatives you have considered

  • tenacity — different API, would require rewriting all decorators.
  • python-backoff — community fork, same API but no new features and still relies on deprecated APIs.
  • Staying on backoff — archived, will break on Python 3.14+.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions