← All recipes
Moderne licensed

Upgrade to Python 3.12

Recipe IDorg.openrewrite.python.migrate.UpgradeToPython312Artifactopenrewrite-migrate-python

Migrate deprecated and removed APIs for Python 3.12 compatibility. This includes detecting usage of the removed imp module and other legacy modules that were removed in Python 3.12.

Composite recipepythonmigration3.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.UpgradeToPython312

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

mod config recipes pip install openrewrite-migrate-python

Definition

This recipe runs the following recipes in order.