ashb commented on code in PR #45627:
URL: https://github.com/apache/airflow/pull/45627#discussion_r1914732675
##########
airflow/models/abstractoperator.py:
##########
@@ -19,40 +19,35 @@
import datetime
import inspect
-from collections.abc import Iterable, Iterator, Mapping, Sequence
+from collections.abc import Iterable, Sequence
from functools import cached_property
from typing import TYPE_CHECKING, Any, Callable
-import methodtools
from sqlalchemy import select
from airflow.configuration import conf
from airflow.exceptions import AirflowException
from airflow.models.expandinput import NotFullyPopulated
-from airflow.sdk.definitions._internal.abstractoperator import
AbstractOperator as TaskSDKAbstractOperator
+from airflow.sdk.definitions._internal.abstractoperator import (
+ AbstractOperator as TaskSDKAbstractOperator,
+ NotMapped as NotMapped,
Review Comment:
This one was to re-export it, I'll add a comment
##########
airflow/models/baseoperator.py:
##########
@@ -53,35 +53,26 @@
TaskDeferred,
)
from airflow.lineage import apply_lineage, prepare_lineage
+
+# Keeping this file at all is a temp thing as we migrate the repo to the task
sdk as the base, but to keep
+# main working and useful for others to develop against we use the TaskSDK
here but keep this file around
from airflow.models.abstractoperator import (
- DEFAULT_EXECUTOR,
- DEFAULT_IGNORE_FIRST_DEPENDS_ON_PAST,
- DEFAULT_OWNER,
- DEFAULT_POOL_SLOTS,
- DEFAULT_PRIORITY_WEIGHT,
- DEFAULT_QUEUE,
- DEFAULT_RETRIES,
- DEFAULT_RETRY_DELAY,
- DEFAULT_TASK_EXECUTION_TIMEOUT,
- DEFAULT_TRIGGER_RULE,
- DEFAULT_WAIT_FOR_PAST_DEPENDS_BEFORE_SKIPPING,
- DEFAULT_WEIGHT_RULE,
AbstractOperator,
+ NotMapped,
)
from airflow.models.base import _sentinel
-from airflow.models.mappedoperator import OperatorPartial,
validate_mapping_kwargs
from airflow.models.taskinstance import TaskInstance, clear_task_instances
from airflow.models.taskmixin import DependencyMixin
from airflow.models.trigger import TRIGGER_FAIL_REPR, TriggerFailureReason
+from airflow.sdk.definitions._internal.abstractoperator import
AbstractOperator as TaskSDKAbstractOperator
from airflow.sdk.definitions.baseoperator import (
BaseOperatorMeta as TaskSDKBaseOperatorMeta,
- get_merged_defaults,
+ get_merged_defaults as get_merged_defaults,
Review Comment:
Ditto here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]