Replace pkgutil.get_loader() with importlib.util.find_spec()
Recipe ID
org.openrewrite.python.migrate.ReplacePkgutilGetLoaderArtifactopenrewrite-migrate-pythonThe pkgutil.get_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.ReplacePkgutilGetLoaderIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-python