Upgrade to Pydantic 2.10

Proprietary

Flag and migrate code affected by deprecations introduced in Pydantic 2.10, such as the deprecated schema_generator config option and the discouraged Field(...) Ellipsis form. Also flags the deprecated json_encoders config option.

org.openrewrite.python.migrate.pydantic.UpgradeToPydantic210
mod run . --recipe=org.openrewrite.python.migrate.pydantic.UpgradeToPydantic210

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find deprecated schema_generator config option
  2. Find deprecated json_encoders config option
  3. Remove ... (Ellipsis) from Field()