You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Hi @yctomwang,
So, developers must migrate the whole project in one step whereas they could have the ability to use progressively V2 base models. This is unfortunate because it makes migration much harder from Pydantic V1 to Pydantic V2 in a Flask project.
I opened a PR for this. I could make it work with a Flask project with Pydantic 2.7 and V1 base models. No performance impact should be noticed.
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 :
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?The text was updated successfully, but these errors were encountered: