← All recipes
Moderne licensed

Replace deprecated distutils.version usage

Recipe IDorg.openrewrite.python.migrate.ReplaceDistutilsVersionArtifactopenrewrite-migrate-python

Detect usage of deprecated distutils.version.LooseVersion and distutils.version.StrictVersion. These should be migrated to packaging.version.Version. Note: Manual migration is required as packaging.version.Version is not a drop-in replacement.

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.ReplaceDistutilsVersion

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

mod config recipes pip install openrewrite-migrate-python