Upgrade Python dependency version
MSALUpgrade the version constraint for a dependency. Supports pyproject.toml (with scope/group targeting), requirements.txt, and Pipfile. A constraint whose lowest admitted version is already at or above the new one is left unchanged. For pyproject.toml, uv.lock, poetry.lock, and pdm.lock are regenerated natively without executing the package manager. For Pipfile, Pipfile.lock is regenerated natively by consulting the project's package index over the network. Not safe to use as a precondition: consults the package index over the network and publishes per-project state shared with other dependency recipes.
org. openrewrite. python. UpgradeDependencyVersionRequired
The PyPI package name to update.
The new PEP 508 version constraint (e.g., >=2.31.0).
Optional
The dependency scope to update in. All scopes are searched by default.
The group name, required when scope is project.optional-dependencies or dependency-groups.
mod run . --recipe= org. openrewrite. python. UpgradeDependencyVersion \
-P packageName= requests \
-P newVersion= '>=2.31.0'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.