Find Python projects by the Python version they require
ProprietaryMark every file of a Python project whose requires-python (or Poetry's python, setup.cfg's or setup.py's python_requires, or a Pipfile's python_version) admits no Python older than the given version, or with below, every file of the other projects. A file belongs to the project whose manifest is in its nearest directory that has one. A project that declares no lower bound, and a file outside any project, count as able to run on older versions. Use it as a precondition to apply a migration only where a project's Python version allows it.
org. openrewrite. python. migrate. ProjectRequiresPythonRequired
The Python version as MAJOR.MINOR, such as 3.11.
Optional
Find the files of the projects that may still run on a Python older than version, rather than of those that require at least version.
mod run . --recipe= org. openrewrite. python. migrate. ProjectRequiresPython \
-P version=3.11Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.