GitHub user Llucs created a discussion: [Idea] Migrate from backoff to backon (drop-in replacement, zero deps, upstream archived)
## Summary [backon](https://github.com/Llucs/backon) is a modern evolution of the [backoff](https://github.com/litl/backoff) library that Superset currently depends on (backoff>=1.8.0). It is a near-drop-in replacement with zero dependencies, active maintenance, and full Python 3.14+ compatibility. ## Motivation ### 1. Upstream backoff is archived The original litl/backoff library was archived in August 2025. It uses asyncio.iscoroutinefunction() which was deprecated in Python 3.14 and removed in Python 3.16. While the python-backoff fork exists, it adds an extra transitive dependency for Superset users. ### 2. Python 3.14+ compatibility Python 3.14 is approaching and backoff will need patches to work with it. backon was designed from the ground up with modern Python in mind (requires 3.9+). ### 3. Zero dependencies backon is pure Python with stdlib only, no runtime dependencies. This removes the backoff transitive dependency from Superset's dependency tree entirely. ### 4. Richer feature set (optional) If desired in the future, backon offers circuit breaker, hedging, context manager API, global toggle for testing, custom sleep injection, Prometheus/OTel metrics, and more, all without adding any required dependencies. ## Migration path Migration is a straightforward import change, the public API is identical: ```diff - import backoff + import backon - @backoff.on_exception(backoff.expo, ValueError, max_tries=3) + @backon.on_exception(backon.expo, ValueError, max_tries=3) ``` All backoff names (expo, fibo, constant, runtime, on_exception, on_predicate, full_jitter, random_jitter) exist in backon with the same signatures. ## Comparison | Area | backoff | backon | |------|---------|--------| | Python support | 3.7+ | 3.9+ | | Dependencies | 0 | 0 | | Maintenance | Archived (Aug 2025) | Active (112+ commits, Jul 2026) | | Type hints | Partial | Full | | Circuit breaker | Not supported | Supported | | Hedging | Not supported | Supported | | Context manager | Not supported | Retrying class | | Global toggle | Not supported | disable()/enable() | | Testing utilities | Not supported | remove_backoff(), assert_retried(), etc. | ## Would the team be open to evaluating this migration? I am happy to submit a PR if there is interest. GitHub link: https://github.com/apache/superset/discussions/42289 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
