← All recipes
Moderne licensed

Find deprecated shutil.rmtree(onerror=...) parameter

Recipe IDorg.openrewrite.python.migrate.FindShutilRmtreeOnerrorArtifactopenrewrite-migrate-python

The onerror parameter of shutil.rmtree() was deprecated in Python 3.12 in favor of onexc. The onexc callback receives the exception object directly rather than an exc_info tuple.

Single recipepythonmigrationshutil3.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.FindShutilRmtreeOnerror

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python