This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 61928bc454 Remove deprecated `ExternalTaskSensorLink` (#41391)
61928bc454 is described below
commit 61928bc454d15951921a73ec5c315b3661551b05
Author: Kaxil Naik <[email protected]>
AuthorDate: Mon Aug 12 02:46:15 2024 +0100
Remove deprecated `ExternalTaskSensorLink` (#41391)
It is replaced by `airflow.sensors.external_task.ExternalDagLink`
---
airflow/sensors/external_task.py | 21 +--------------------
newsfragments/41391.significant.rst | 5 +++++
tests/sensors/test_external_task_sensor.py | 9 ---------
3 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/airflow/sensors/external_task.py b/airflow/sensors/external_task.py
index 339ad79056..8eb501e281 100644
--- a/airflow/sensors/external_task.py
+++ b/airflow/sensors/external_task.py
@@ -22,10 +22,8 @@ import os
import warnings
from typing import TYPE_CHECKING, Any, Callable, Collection, Iterable
-import attr
-
from airflow.configuration import conf
-from airflow.exceptions import AirflowException, AirflowSkipException,
RemovedInAirflow3Warning
+from airflow.exceptions import AirflowException, AirflowSkipException
from airflow.models.baseoperatorlink import BaseOperatorLink
from airflow.models.dag import DagModel
from airflow.models.dagbag import DagBag
@@ -511,20 +509,3 @@ class ExternalTaskMarker(EmptyOperator):
if not cls.__serialized_fields:
cls.__serialized_fields =
frozenset(super().get_serialized_fields() | {"recursion_depth"})
return cls.__serialized_fields
-
-
[email protected](auto_attribs=True)
-class ExternalTaskSensorLink(ExternalDagLink):
- """
- This external link is deprecated.
-
- Please use :class:`airflow.sensors.external_task.ExternalDagLink`.
- """
-
- def __attrs_post_init__(self):
- warnings.warn(
- "This external link is deprecated. "
- "Please use
:class:`airflow.sensors.external_task.ExternalDagLink`.",
- RemovedInAirflow3Warning,
- stacklevel=2,
- )
diff --git a/newsfragments/41391.significant.rst
b/newsfragments/41391.significant.rst
new file mode 100644
index 0000000000..6ab26848f0
--- /dev/null
+++ b/newsfragments/41391.significant.rst
@@ -0,0 +1,5 @@
+**Breaking Change**
+
+The ``airflow.sensors.external_task.ExternalTaskSensorLink`` class has been
removed.
+This class was deprecated and is no longer available. Users should now use
+the ``airflow.sensors.external_task.ExternalDagLink`` class directly.
diff --git a/tests/sensors/test_external_task_sensor.py
b/tests/sensors/test_external_task_sensor.py
index fbebd3d120..8c5ed3c429 100644
--- a/tests/sensors/test_external_task_sensor.py
+++ b/tests/sensors/test_external_task_sensor.py
@@ -41,7 +41,6 @@ from airflow.operators.python import PythonOperator
from airflow.sensors.external_task import (
ExternalTaskMarker,
ExternalTaskSensor,
- ExternalTaskSensorLink,
)
from airflow.sensors.time_sensor import TimeSensor
from airflow.serialization.serialized_objects import SerializedBaseOperator
@@ -1737,11 +1736,3 @@ def
test_clear_overlapping_external_task_marker_mapped_tasks(dag_bag_head_tail_m
)
== 70
)
-
-
-class TestExternalTaskSensorLink:
- def test_deprecation_warning(self):
- with pytest.warns(DeprecationWarning) as warnings:
- ExternalTaskSensorLink()
- assert len(warnings) == 1
- assert warnings[0].filename == __file__