Upgrade to Pydantic 2.14
Recipe ID
org.openrewrite.python.migrate.pydantic.UpgradeToPydantic214Artifactopenrewrite-migrate-pythonMigrate code affected by changes introduced in Pydantic 2.14 (and 2.10-2.13). Flags eval_type_backport usage, whose support 2.14 removed. Note: 2.14 is in prerelease; verify against the 2.14.0 GA release.
Composite recipepythonpydanticmigration2.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.pydantic.UpgradeToPydantic214If the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-migrate-pythonDefinition
This recipe runs the following recipes in order.
- Upgrade to Pydantic 2.13
org.openrewrite.python.migrate.pydantic.UpgradeToPydantic213 - Find
eval_type_backportusage removed in Pydantic 2.14org.openrewrite.python.migrate.pydantic.FindEvalTypeBackportUsage