uranusjr commented on code in PR #53071:
URL: https://github.com/apache/airflow/pull/53071#discussion_r2288091741
##########
airflow-core/src/airflow/triggers/base.py:
##########
@@ -33,20 +31,25 @@
)
from airflow.utils.log.logging_mixin import LoggingMixin
+from airflow.utils.module_loading import import_string
from airflow.utils.state import TaskInstanceState
log = structlog.get_logger(logger_name=__name__)
-@dataclass
-class StartTriggerArgs:
- """Arguments required for start task execution from triggerer."""
+def __getattr__(name: str):
+ if name == "StartTriggerArgs":
+ import warnings
- trigger_cls: str
- next_method: str
- trigger_kwargs: dict[str, Any] | None = None
- next_kwargs: dict[str, Any] | None = None
- timeout: timedelta | None = None
+ warnings.warn(
+ "airflow.triggers.base.StartTriggerArgs is deprecated. "
+ "Use airflow.sdk.bases.trigger.StartTriggerArgs instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ return import_string(f"airflow.sdk.bases.trigger.{name}")
+
+ raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
Review Comment:
I wonder if we need this compat; StartTriggerArgs is not useful to end users
at all and likely not used by anybody.
--
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]