redis-om-python/tests/_compat.py
Manabu Niseki 3a0fa0c7be
Allow using Pydantic v2 (#533)
Co-authored-by: Chayim <chayim@users.noreply.github.com>
2023-07-12 11:48:08 +03:00

8 lines
171 B
Python

from aredis_om._compat import PYDANTIC_V2
if PYDANTIC_V2:
from pydantic.v1 import EmailStr, ValidationError
else:
from pydantic import EmailStr, ValidationError