Skip to content

Commit

Permalink
Update pingsu's advice
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Su <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
  • Loading branch information
Future-Outlier and pingsutw committed Mar 10, 2024
1 parent abf08f7 commit 7e5aa08
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

from . import deserialization, serialization

# pydantic plugin is not suitable for lazy module.
try:
# it will cause error if it is lesser than 2.0 version
# TODO: Use pydantic v2 to serialize/deserialize data
# https://github.com/flyteorg/flyte/issues/5033
import pydantic.v1 as pydantic
except ImportError:
import pydantic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from flytekit.types import directory, file

try:
# it will cause error if it is lesser than 2.0 version
# TODO: Use pydantic v2 to serialize/deserialize data
# https://github.com/flyteorg/flyte/issues/5033
import pydantic.v1 as pydantic
except ImportError:
import pydantic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from . import commons

try:
# it will cause error if it is lesser than 2.0 version
# TODO: Use pydantic v2 to serialize/deserialize data
# https://github.com/flyteorg/flyte/issues/5033
import pydantic.v1 as pydantic
except ImportError:
import pydantic
Expand Down
3 changes: 2 additions & 1 deletion plugins/flytekit-pydantic/tests/test_type_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from flytekit.types.file import file

try:
# it will cause error if it is lesser than 2.0 version
# TODO: Use pydantic v2 to serialize/deserialize data
# https://github.com/flyteorg/flyte/issues/5033
from pydantic.v1 import BaseModel, Extra
except ImportError:
from pydantic import BaseModel, Extra
Expand Down

0 comments on commit 7e5aa08

Please sign in to comment.