flask-pydantic
flask-pydantic copied to clipboard
Add backward compatibility with Pydantic V1
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.