Replace pkgutil.find_loader() with importlib.util.find_spec()
ProprietaryThe pkgutil.find_loader() function was deprecated in Python 3.12 and removed in 3.14. Replace with importlib.util.find_spec(), which returns a ModuleSpec, so code that needs the loader reads its .loader. A call passing the name as a keyword is left alone.
org. openrewrite. python. migrate. ReplacePkgutilFindLoadermod run . --recipe= org. openrewrite. python. migrate. ReplacePkgutilFindLoaderInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.