Upgrade to Pydantic 2.12
ProprietaryMigrate code affected by changes introduced in Pydantic 2.12 (and 2.10/2.11). Flags serialize_as_any usage affected by the 2.12 unification with the SerializeAsAny annotation, and @model_validator(mode='after') on a classmethod.
org. openrewrite. python. migrate. pydantic. UpgradeToPydantic212mod run . --recipe= org. openrewrite. python. migrate. pydantic. UpgradeToPydantic212Install 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.