← All recipes
Moderne licensed

Replace collections ABC imports with collections.abc

Recipe IDorg.openrewrite.python.migrate.ReplaceCollectionsAbcImportsArtifactopenrewrite-migrate-python

Migrate deprecated abstract base class imports from collections to collections.abc. These imports were deprecated in Python 3.3 and removed in Python 3.10.

Composite recipepythoncollectionsmigration3.10Proprietary

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.ReplaceCollectionsAbcImports

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.