Find backoff decorators that need a hand migration
Recipe ID
org.openrewrite.python.migrate.FindBackoffDecoratorsNotMigratedArtifactopenrewrite-migrate-pythonMark every @backoff.on_exception and @backoff.on_predicate that org.openrewrite.python.migrate.ReplaceBackoffDecoratorsWithTenacity declines to rewrite, with the reason, and record it in a data table. This changes no behaviour; it scopes the hand migration left after the mechanical one. The markup it prints is not valid Python, so run it for a report rather than as part of a migration.
Single recipepythonsearchbackofftenacityretryProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.python.migrate.FindBackoffDecoratorsNotMigratedIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python
mod config recipes jar install org.openrewrite.recipe:rewrite-migrate-python:RELEASE
mod config recipes jar install org.openrewrite:rewrite-python:RELEASEData tables
Structured output this recipe can produce.
- Backoff decorators needing a hand migrationBackoff retry decorators whose behaviour tenacity cannot reproduce mechanically.
org.openrewrite.python.migrate.table.BackoffDecorators