Replace pkgutil.find_loader() with importlib.util.find_spec()
Recipe ID
org.openrewrite.python.migrate.ReplacePkgutilFindLoaderArtifactopenrewrite-migrate-pythonThe pkgutil.find_loader() function was deprecated in Python 3.12. Replace with importlib.util.find_spec(). Note: returns ModuleSpec, use .loader for loader.
Single recipeProprietary
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.ReplacePkgutilFindLoaderIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python