← All recipes
Moderne licensed

Find deprecated locale.getdefaultlocale() usage

Recipe IDorg.openrewrite.python.migrate.FindLocaleGetdefaultlocaleArtifactopenrewrite-migrate-python

locale.getdefaultlocale() was deprecated in Python 3.11. Use locale.setlocale(), locale.getlocale(), or locale.getpreferredencoding(False) instead.

Single recipepythonmigration3.11localeProprietary

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

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

mod config recipes pip install openrewrite-migrate-python