diff --git a/python_modules/dagster/dagster/_core/execution/context/compute.py b/python_modules/dagster/dagster/_core/execution/context/compute.py index 2cce65e34b43f..7f24bdb26669b 100644 --- a/python_modules/dagster/dagster/_core/execution/context/compute.py +++ b/python_modules/dagster/dagster/_core/execution/context/compute.py @@ -1399,17 +1399,7 @@ def _get_deprecation_kwargs(attr: str): return deprecation_kwargs -class RunProperties( - NamedTuple( - "_RunProperties", - [ - ("run_id", PublicAttr[str]), - ("dagster_run", PublicAttr[DagsterRun]), - ("run_config", PublicAttr[Mapping[str, object]]), - ("retry_number", PublicAttr[int]), - ], - ) -): +class RunProperties(NamedTuple): """Relevant information about a run while it is executing. Contains: * The run ID * The DagsterRun object, which contains further information about the run @@ -1417,20 +1407,10 @@ class RunProperties( * The retry number - how many times this step has been retried. """ - def __new__( - cls, - run_id: str, - dagster_run: DagsterRun, - run_config: Mapping[str, object], - retry_number: int, - ): - return super(RunProperties, cls).__new__( - cls, - run_id=run_id, - dagster_run=dagster_run, - run_config=run_config, - retry_number=retry_number, - ) + run_id: PublicAttr[str] + dagster_run: PublicAttr[DagsterRun] + run_config: PublicAttr[Mapping[str, object]] + retry_number: PublicAttr[int] class AssetExecutionContext(OpExecutionContext): diff --git a/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py b/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py index 503bb619aa611..4a7a0018ae184 100644 --- a/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py +++ b/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py @@ -95,7 +95,7 @@ def assert_deprecation_messages_as_expected(received_info, expected_info): assert received_info.subject == expected_info["subject"] for attr in dir(OpExecutionContext): - if attr[:2] == "__" or attr in other_ignores: + if attr.startswith("__") or attr in other_ignores: continue if not hasattr(AssetExecutionContext, attr): raise Exception(