diff --git a/python_modules/dagster/dagster/_core/execution/context/compute.py b/python_modules/dagster/dagster/_core/execution/context/compute.py index cbf30532dacc0..fb859cb42cee5 100644 --- a/python_modules/dagster/dagster/_core/execution/context/compute.py +++ b/python_modules/dagster/dagster/_core/execution/context/compute.py @@ -125,10 +125,10 @@ def __instancecheck__(cls, instance) -> bool: deprecation_warning( subject="AssetExecutionContext", additional_warn_text=( - "Starting in version 1.7.0 AssetExecutionContext will no longer be a subclass" + "Starting in version 1.8.0 AssetExecutionContext will no longer be a subclass" " of OpExecutionContext." ), - breaking_version="1.7.0", + breaking_version="1.8.0", stacklevel=1, ) return super().__instancecheck__(instance) @@ -1363,6 +1363,7 @@ def _copy_docs_from_op_execution_context(obj): "dagster_run": "run", "run_config": "run.run_config", "run_tags": "run.tags", + "get_op_execution_context": "op_execution_context", } ALTERNATE_EXPRESSIONS = { @@ -1496,6 +1497,10 @@ def has_tag(self, key: str) -> bool: def get_tag(self, key: str) -> Optional[str]: return self.op_execution_context.get_tag(key) + @deprecated(**_get_deprecation_kwargs("get_op_execution_context")) + def get_op_execution_context(self) -> "OpExecutionContext": + return self.op_execution_context + ########## pass-through to op context #### op related @@ -1809,9 +1814,6 @@ def typed_event_stream_error_message(self) -> Optional[str]: def set_requires_typed_event_stream(self, *, error_message: Optional[str] = None) -> None: self.op_execution_context.set_requires_typed_event_stream(error_message=error_message) - def get_op_execution_context(self) -> "OpExecutionContext": - return self.op_execution_context - @contextmanager def enter_execution_context(