← All recipes
Moderne licensed

Find deprecated urllib.parse.to_bytes() usage

Recipe IDorg.openrewrite.python.migrate.FindUrllibParseToBytesArtifactopenrewrite-migrate-python

Find usage of urllib.parse.to_bytes() which was deprecated in Python 3.8 and removed in 3.14. Use str.encode() directly.

Single recipepythonurllibmigration3.14Proprietary

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

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

mod config recipes pip install openrewrite-migrate-python