From e6881440a879ba079f5d09d4f896a81e28ee3118 Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Thu, 21 Sep 2023 16:04:24 -0400 Subject: [PATCH] remove interface for now --- .../dagster/_core/execution/context/compute.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python_modules/dagster/dagster/_core/execution/context/compute.py b/python_modules/dagster/dagster/_core/execution/context/compute.py index 9e73c606db9f7..faeb87278b95c 100644 --- a/python_modules/dagster/dagster/_core/execution/context/compute.py +++ b/python_modules/dagster/dagster/_core/execution/context/compute.py @@ -12,8 +12,7 @@ cast, ) -from dagster_ext import IContext - +# from dagster_ext import IContext import dagster._check as check from dagster._annotations import deprecated, experimental, public from dagster._core.definitions.asset_check_spec import AssetCheckSpec @@ -1279,6 +1278,7 @@ def asset_check_spec(self) -> AssetCheckSpec: "step_launcher", "has_events", "consume_events", + "log_event", ] ) @@ -1344,7 +1344,7 @@ def _get_deprecation_kwargs(attr: str): return deprecation_kwargs -class AssetExecutionContext(OpExecutionContext, IContext): +class AssetExecutionContext(OpExecutionContext): def __init__(self, op_execution_context: OpExecutionContext) -> None: self._op_execution_context = check.inst_param( op_execution_context, "op_execution_context", OpExecutionContext @@ -1457,10 +1457,6 @@ def log(self) -> DagsterLogManager: """DagsterLogManager: The log manager available in the execution context.""" return self._op_execution_context.log - @public - def log_event(self, event: UserEvent) -> None: - return self._op_execution_context.log_event(event) - @public @property def assets_def(self) -> AssetsDefinition: @@ -1696,3 +1692,7 @@ def has_events(self) -> bool: @property def asset_check_spec(self) -> AssetCheckSpec: return self._op_execution_context.asset_check_spec + + @deprecated(**_get_deprecation_kwargs("log_event")) + def log_event(self, event: UserEvent) -> None: + return self._op_execution_context.log_event(event)