Migrate the deprecated avro-python3 package to avro
Recipe ID
org.openrewrite.python.migrate.MigrateAvroPython3ToAvroArtifactopenrewrite-migrate-pythonReplace the deprecated avro-python3 distribution with its maintained successor, Apache avro. Both install the same top-level avro import package, so module imports are unchanged, but avro-python3's avro.schema.Parse was renamed to the lowercase avro.schema.parse (and Parse removed) in avro 1.11+, so that reference is rewritten. The dependency swap is applied by org.openrewrite.python.ChangeDependency.
Composite recipepythonmigrationavrodependenciesProprietary
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.MigrateAvroPython3ToAvroIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-pythonDefinition
This recipe runs the following recipes in order.
- Change type
org.openrewrite.python.ChangeType - org.openrewrite.python.ChangeDependency
org.openrewrite.python.ChangeDependency