← All recipes
Moderne licensed

Upgrade to Python 3.10

Recipe IDorg.openrewrite.python.migrate.UpgradeToPython310Artifactopenrewrite-migrate-python

Migrate deprecated APIs and adopt new syntax for Python 3.10 compatibility. This includes adopting PEP 604 union type syntax (X | Y) and other modernizations between Python 3.9 and 3.10.

Composite recipepythonmigration3.10Proprietary

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

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.