Find deprecated imp module usage
Recipe ID
org.openrewrite.python.migrate.FindImpUsageArtifactopenrewrite-migrate-pythonFind imports of the deprecated imp module which was removed in Python 3.12. Migrate to importlib.
Single recipepythonmigration3.12Proprietary
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.FindImpUsageIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python