Skip to content

Commit 0aebdc1

Browse files
[v3-1-test] Don't depend upon FastAPI inside Task-SDK client (#59250) (#59257)
This annotation did nothing, and it just slows down imports. (cherry picked from commit 740da66) Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
1 parent cea67cd commit 0aebdc1

File tree

1 file changed

+1
-23
lines changed
  • task-sdk/src/airflow/sdk/execution_time

1 file changed

+1
-23
lines changed

task-sdk/src/airflow/sdk/execution_time/comms.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
import attrs
6161
import msgspec
6262
import structlog
63-
from fastapi import Body
6463
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, JsonValue, TypeAdapter, field_serializer
6564

6665
from airflow.sdk.api.datamodels._generated import (
@@ -728,28 +727,7 @@ class GetXComSequenceSlice(BaseModel):
728727

729728
class SetXCom(BaseModel):
730729
key: str
731-
value: Annotated[
732-
# JsonValue can handle non JSON stringified dicts, lists and strings, which is better
733-
# for the task intuitibe to send to the supervisor
734-
JsonValue,
735-
Body(
736-
description="A JSON-formatted string representing the value to set for the XCom.",
737-
openapi_examples={
738-
"simple_value": {
739-
"summary": "Simple value",
740-
"value": "value1",
741-
},
742-
"dict_value": {
743-
"summary": "Dictionary value",
744-
"value": {"key2": "value2"},
745-
},
746-
"list_value": {
747-
"summary": "List value",
748-
"value": ["value1"],
749-
},
750-
},
751-
),
752-
]
730+
value: JsonValue
753731
dag_id: str
754732
run_id: str
755733
task_id: str

0 commit comments

Comments
 (0)