Skip to content

Commit

Permalink
Merge pull request #603 from PrefectHQ/fix-imports
Browse files Browse the repository at this point in the history
fix imports
  • Loading branch information
aaazzam authored Sep 28, 2023
2 parents f37ad5b + 19fd898 commit e15186a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies = [
"jsonpatch>=1.33",
"openai>=0.27.8",
"pydantic[dotenv]>=1.10.7",
"pydantic-settings>=2.0.0",
"rich>=12",
"tiktoken>=0.4.0",
"typer>=0.9.0",
Expand Down Expand Up @@ -49,6 +48,7 @@ tests = [
"pytest-rerunfailures>=10,<13",
"pytest-sugar~=0.9",
"pytest~=7.3.1",
"pydantic-settings>=2.0.0",
]
framework = [
"aiosqlite>=0.19.0",
Expand Down
8 changes: 6 additions & 2 deletions src/marvin/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@

if PYDANTIC_V2:
from pydantic.v1 import validate_arguments # noqa # type: ignore
from pydantic_settings import BaseSettings # noqa # type: ignore
from pydantic_settings import SettingsConfigDict # noqa # type: ignore

try:
from pydantic_settings import BaseSettings # noqa # type: ignore
from pydantic_settings import SettingsConfigDict # noqa # type: ignore
except Exception as e:
print('Please install "pydantic-settings" to marvin with Pydantic v2.', e)
from pydantic import field_validator # noqa # type: ignore

else:
Expand Down

0 comments on commit e15186a

Please sign in to comment.