Allow using Pydantic v2 (#533)
Co-authored-by: Chayim <chayim@users.noreply.github.com>
This commit is contained in:
parent
323787151e
commit
3a0fa0c7be
10 changed files with 45 additions and 14 deletions
7
tests/_compat.py
Normal file
7
tests/_compat.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
from aredis_om._compat import PYDANTIC_V2
|
||||
|
||||
|
||||
if PYDANTIC_V2:
|
||||
from pydantic.v1 import EmailStr, ValidationError
|
||||
else:
|
||||
from pydantic import EmailStr, ValidationError
|
||||
Loading…
Add table
Add a link
Reference in a new issue