← All recipes
Moderne licensed

Find deprecated os.popen() usage

Recipe IDorg.openrewrite.python.migrate.FindOsPopenArtifactopenrewrite-migrate-python

os.popen() has been deprecated since Python 3.6. Use subprocess.run() or subprocess.Popen() instead for better control over process creation and output handling.

Single recipepythonmigrationsubprocessProprietary

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

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

mod config recipes pip install openrewrite-migrate-python