← All recipes
Moderne licensed

Migrate the deprecated avro-python3 package to avro

Recipe IDorg.openrewrite.python.migrate.MigrateAvroPython3ToAvroArtifactopenrewrite-migrate-python

Replace 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.MigrateAvroPython3ToAvro

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python

Definition

This recipe runs the following recipes in order.