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

Add backward compatibility with Pydantic V1

Open Merinorus opened this issue 8 months ago • 10 comments

Add back the support of Pydantic V1 (Implements #90). This eases the migration from Pydantic V1 to Pydantic V2.

Without this support, users cannot gradually migrate a Flask project from Pydantic V1 to Pydantic V2. I tried to keep the code change to a minimum. However, test files are in a separate folder, to ease the migration when Pydantic V1 support would be completely dropped.

No noticeable performance impact for Pydantic V2 users.

Merinorus avatar Jun 14 '24 11:06 Merinorus