Skip to content

Commit

Permalink
Remove FastAPI from prefect.flow's default import path. (#16473)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaazzam authored and devinvillarosa committed Dec 24, 2024
1 parent c2e40d7 commit fc5e38d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/prefect/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from uuid import UUID

import pydantic
from fastapi.encoders import jsonable_encoder
from pydantic.v1 import BaseModel as V1BaseModel
from pydantic.v1.decorator import ValidatedFunction as V1ValidatedFunction
from pydantic.v1.errors import ConfigError # TODO
Expand Down Expand Up @@ -613,6 +612,8 @@ def serialize_parameters(self, parameters: dict[str, Any]) -> dict[str, Any]:
serialized_parameters[key] = f"<{type(value).__name__}>"
continue
try:
from fastapi.encoders import jsonable_encoder

serialized_parameters[key] = jsonable_encoder(value)
except (TypeError, ValueError):
logger.debug(
Expand Down

0 comments on commit fc5e38d

Please sign in to comment.