This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new afabb8d4cb9 Fix Context Type hint (#45584)
afabb8d4cb9 is described below
commit afabb8d4cb942da11c59a6cc54b0048af15914f0
Author: Kaxil Naik <[email protected]>
AuthorDate: Sun Jan 12 14:38:06 2025 +0530
Fix Context Type hint (#45584)
PR removes now deprecated `AssetEventPydantic` & `DagRunPydantic`
---
airflow/utils/context.pyi | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/airflow/utils/context.pyi b/airflow/utils/context.pyi
index a3b69633e7f..b08833623c4 100644
--- a/airflow/utils/context.pyi
+++ b/airflow/utils/context.pyi
@@ -39,8 +39,6 @@ from airflow.models.dagrun import DagRun
from airflow.models.param import ParamsDict
from airflow.models.taskinstance import TaskInstance
from airflow.sdk.definitions.asset import Asset, AssetAlias, AssetRef,
AssetUniqueKey, BaseAssetUniqueKey
-from airflow.serialization.pydantic.asset import AssetEventPydantic
-from airflow.serialization.pydantic.dag_run import DagRunPydantic
from airflow.typing_compat import TypedDict
KNOWN_CONTEXT_KEYS: set[str]
@@ -101,7 +99,7 @@ class InletEventsAccessors(Mapping[Asset | AssetAlias,
InletEventsAccessor]):
class Context(TypedDict, total=False):
conn: Any
dag: DAG
- dag_run: DagRun | DagRunPydantic
+ dag_run: DagRun
data_interval_end: DateTime
data_interval_start: DateTime
outlet_events: OutletEventAccessors
@@ -128,7 +126,7 @@ class Context(TypedDict, total=False):
test_mode: bool
templates_dict: Mapping[str, Any] | None
ti: TaskInstance
- triggering_asset_events: Mapping[str, Collection[AssetEvent |
AssetEventPydantic]]
+ triggering_asset_events: Mapping[str, Collection[AssetEvent]]
ts: str
ts_nodash: str
ts_nodash_with_tz: str