← All recipes
Moderne licensed

Replace deprecated calendar constants with uppercase

Recipe IDorg.openrewrite.python.migrate.ReplaceCalendarConstantsArtifactopenrewrite-migrate-python

Replace deprecated mixed-case calendar constants like calendar.January with their uppercase equivalents like calendar.JANUARY. The mixed-case constants were deprecated in Python 3.12.

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

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

mod config recipes pip install openrewrite-migrate-python