flask-pydantic icon indicating copy to clipboard operation
flask-pydantic copied to clipboard

Support of module pydantic.v1 Since update to Pydantic V2

Open Merinorus opened this issue 1 year ago • 2 comments

Hello,

Since the V2 update, Pydantic V2 still includes the V1 models to make the migration easier : https://docs.pydantic.dev/latest/migration/#continue-using-pydantic-v1-features

Example :

 from pydantic.v1 import BaseModel

Unfortunately, it seems flask-pydantic dropped the V1 support when it started to support Pydantic V2 (from version 0.12.0). So, if we have to upgrade, we cannot use the pydantic.v1 legacy models with Flask-Pydantic and we have to migrate the whole project's models to Pydantic V2 models directly. Right?

Merinorus avatar Feb 26 '24 12:02 Merinorus