diff --git a/airflow/example_dags/example_bash_decorator.py b/airflow/example_dags/example_bash_decorator.py index 36c9c2d7ecfe1..c976853fffc4e 100644 --- a/airflow/example_dags/example_bash_decorator.py +++ b/airflow/example_dags/example_bash_decorator.py @@ -22,7 +22,7 @@ from airflow.decorators import dag, task from airflow.exceptions import AirflowSkipException from airflow.models.baseoperator import chain -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.trigger_rule import TriggerRule from airflow.utils.weekday import WeekDay diff --git a/airflow/example_dags/example_bash_operator.py b/airflow/example_dags/example_bash_operator.py index 27702d4cb5f10..ab9d09f5cbb6d 100644 --- a/airflow/example_dags/example_bash_operator.py +++ b/airflow/example_dags/example_bash_operator.py @@ -24,8 +24,8 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="example_bash_operator", diff --git a/airflow/example_dags/example_branch_datetime_operator.py b/airflow/example_dags/example_branch_datetime_operator.py index 99645b9c9eb0a..39589b46f3f3b 100644 --- a/airflow/example_dags/example_branch_datetime_operator.py +++ b/airflow/example_dags/example_branch_datetime_operator.py @@ -25,8 +25,8 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.datetime import BranchDateTimeOperator +from airflow.providers.standard.operators.empty import EmptyOperator dag1 = DAG( dag_id="example_branch_datetime_operator", diff --git a/airflow/example_dags/example_branch_day_of_week_operator.py b/airflow/example_dags/example_branch_day_of_week_operator.py index b7eed08acdf45..95729e5a23deb 100644 --- a/airflow/example_dags/example_branch_day_of_week_operator.py +++ b/airflow/example_dags/example_branch_day_of_week_operator.py @@ -24,7 +24,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.weekday import BranchDayOfWeekOperator from airflow.utils.weekday import WeekDay diff --git a/airflow/example_dags/example_branch_labels.py b/airflow/example_dags/example_branch_labels.py index 7e90f26d0f952..fadb5f23cb5ac 100644 --- a/airflow/example_dags/example_branch_labels.py +++ b/airflow/example_dags/example_branch_labels.py @@ -24,7 +24,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label with DAG( diff --git a/airflow/example_dags/example_branch_operator.py b/airflow/example_dags/example_branch_operator.py index 35f7a9b548e56..5c41e65216abd 100644 --- a/airflow/example_dags/example_branch_operator.py +++ b/airflow/example_dags/example_branch_operator.py @@ -30,7 +30,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import ( BranchExternalPythonOperator, BranchPythonOperator, diff --git a/airflow/example_dags/example_branch_operator_decorator.py b/airflow/example_dags/example_branch_operator_decorator.py index 95bfba4cdc605..bfe988e276d7a 100644 --- a/airflow/example_dags/example_branch_operator_decorator.py +++ b/airflow/example_dags/example_branch_operator_decorator.py @@ -32,7 +32,7 @@ from airflow.decorators import task from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label from airflow.utils.trigger_rule import TriggerRule diff --git a/airflow/example_dags/example_branch_python_dop_operator_3.py b/airflow/example_dags/example_branch_python_dop_operator_3.py index 4bb940ca36dd7..8bca82645f865 100644 --- a/airflow/example_dags/example_branch_python_dop_operator_3.py +++ b/airflow/example_dags/example_branch_python_dop_operator_3.py @@ -26,7 +26,7 @@ from airflow.decorators import task from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator @task.branch() diff --git a/airflow/example_dags/example_display_name.py b/airflow/example_dags/example_display_name.py index b6b447d632a6a..2655fe8067d3a 100644 --- a/airflow/example_dags/example_display_name.py +++ b/airflow/example_dags/example_display_name.py @@ -20,7 +20,7 @@ import pendulum from airflow.decorators import dag, task -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator # [START dag_decorator_usage] diff --git a/airflow/example_dags/example_external_task_marker_dag.py b/airflow/example_dags/example_external_task_marker_dag.py index 0a282a834195c..a4c630a1e9f78 100644 --- a/airflow/example_dags/example_external_task_marker_dag.py +++ b/airflow/example_dags/example_external_task_marker_dag.py @@ -43,7 +43,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.sensors.external_task import ExternalTaskMarker, ExternalTaskSensor start_date = pendulum.datetime(2021, 1, 1, tz="UTC") diff --git a/airflow/example_dags/example_latest_only.py b/airflow/example_dags/example_latest_only.py index 2eac0819db18a..1bda2751312e3 100644 --- a/airflow/example_dags/example_latest_only.py +++ b/airflow/example_dags/example_latest_only.py @@ -22,7 +22,7 @@ import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.latest_only import LatestOnlyOperator with DAG( diff --git a/airflow/example_dags/example_latest_only_with_trigger.py b/airflow/example_dags/example_latest_only_with_trigger.py index 1b05d5726b644..63dba3a5d3917 100644 --- a/airflow/example_dags/example_latest_only_with_trigger.py +++ b/airflow/example_dags/example_latest_only_with_trigger.py @@ -27,7 +27,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.latest_only import LatestOnlyOperator from airflow.utils.trigger_rule import TriggerRule diff --git a/airflow/example_dags/example_nested_branch_dag.py b/airflow/example_dags/example_nested_branch_dag.py index 4e44c3eed1fe5..d0f3eea02d72e 100644 --- a/airflow/example_dags/example_nested_branch_dag.py +++ b/airflow/example_dags/example_nested_branch_dag.py @@ -27,7 +27,7 @@ from airflow.decorators import task from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.trigger_rule import TriggerRule with DAG( diff --git a/airflow/example_dags/example_short_circuit_decorator.py b/airflow/example_dags/example_short_circuit_decorator.py index 2d82eeed069b6..d87946d94687b 100644 --- a/airflow/example_dags/example_short_circuit_decorator.py +++ b/airflow/example_dags/example_short_circuit_decorator.py @@ -22,7 +22,7 @@ from airflow.decorators import dag, task from airflow.models.baseoperator import chain -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.trigger_rule import TriggerRule diff --git a/airflow/example_dags/example_short_circuit_operator.py b/airflow/example_dags/example_short_circuit_operator.py index 5ffab8a14bc0f..eb632185aa361 100644 --- a/airflow/example_dags/example_short_circuit_operator.py +++ b/airflow/example_dags/example_short_circuit_operator.py @@ -23,7 +23,7 @@ from airflow.models.baseoperator import chain from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import ShortCircuitOperator from airflow.utils.trigger_rule import TriggerRule diff --git a/airflow/example_dags/example_skip_dag.py b/airflow/example_dags/example_skip_dag.py index 885cbd2e43310..99f439cc3f7bc 100644 --- a/airflow/example_dags/example_skip_dag.py +++ b/airflow/example_dags/example_skip_dag.py @@ -27,7 +27,7 @@ from airflow.exceptions import AirflowSkipException from airflow.models.baseoperator import BaseOperator from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.trigger_rule import TriggerRule if TYPE_CHECKING: diff --git a/airflow/example_dags/example_task_group.py b/airflow/example_dags/example_task_group.py index 5129ad3cc61e1..2f1931808b508 100644 --- a/airflow/example_dags/example_task_group.py +++ b/airflow/example_dags/example_task_group.py @@ -22,8 +22,8 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.task_group import TaskGroup # [START howto_task_group] diff --git a/airflow/example_dags/example_time_delta_sensor_async.py b/airflow/example_dags/example_time_delta_sensor_async.py index 15a1e52690a7e..140dd866b9e0f 100644 --- a/airflow/example_dags/example_time_delta_sensor_async.py +++ b/airflow/example_dags/example_time_delta_sensor_async.py @@ -27,7 +27,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.sensors.time_delta import TimeDeltaSensorAsync with DAG( diff --git a/airflow/example_dags/example_workday_timetable.py b/airflow/example_dags/example_workday_timetable.py index 8fd86ad185586..db569c8e62726 100644 --- a/airflow/example_dags/example_workday_timetable.py +++ b/airflow/example_dags/example_workday_timetable.py @@ -20,7 +20,7 @@ from airflow.example_dags.plugins.workday import AfterWorkdayTimetable from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="example_workday_timetable", diff --git a/docs/apache-airflow/administration-and-deployment/lineage.rst b/docs/apache-airflow/administration-and-deployment/lineage.rst index 836b11fe720f6..0219d7b744472 100644 --- a/docs/apache-airflow/administration-and-deployment/lineage.rst +++ b/docs/apache-airflow/administration-and-deployment/lineage.rst @@ -37,7 +37,7 @@ works. from airflow.models import DAG from airflow.providers.common.compat.lineage.entities import File from airflow.providers.standard.operators.bash import BashOperator - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator FILE_CATEGORIES = ["CAT1", "CAT2", "CAT3"] diff --git a/docs/apache-airflow/administration-and-deployment/logging-monitoring/callbacks.rst b/docs/apache-airflow/administration-and-deployment/logging-monitoring/callbacks.rst index 4f74626ab29ba..d20b5d3c92ba4 100644 --- a/docs/apache-airflow/administration-and-deployment/logging-monitoring/callbacks.rst +++ b/docs/apache-airflow/administration-and-deployment/logging-monitoring/callbacks.rst @@ -66,7 +66,7 @@ In the following example, failures in any task call the ``task_failure_alert`` f import pendulum from airflow import DAG - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator def task_failure_alert(context): diff --git a/docs/apache-airflow/core-concepts/dags.rst b/docs/apache-airflow/core-concepts/dags.rst index b76b1525be82f..4240cea2cc77c 100644 --- a/docs/apache-airflow/core-concepts/dags.rst +++ b/docs/apache-airflow/core-concepts/dags.rst @@ -43,7 +43,7 @@ which will add anything inside it to the DAG implicitly: import datetime from airflow import DAG - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="my_dag_name", @@ -61,7 +61,7 @@ Or, you can use a standard constructor, passing the DAG into any operators you u import datetime from airflow import DAG - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator my_dag = DAG( dag_id="my_dag_name", @@ -79,7 +79,7 @@ Or, you can use the ``@dag`` decorator to :ref:`turn a function into a DAG gener import datetime from airflow.decorators import dag - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator @dag(start_date=datetime.datetime(2021, 1, 1), schedule="@daily") @@ -455,7 +455,7 @@ You can also combine this with the :ref:`concepts:depends-on-past` functionality from airflow.decorators import task from airflow.models import DAG - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator dag = DAG( dag_id="branch_without_trigger", @@ -575,7 +575,7 @@ TaskGroup also supports ``default_args`` like DAG, it will overwrite the ``defau from airflow import DAG from airflow.decorators import task_group from airflow.providers.standard.operators.bash import BashOperator - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="dag1", diff --git a/docs/apache-airflow/howto/timetable.rst b/docs/apache-airflow/howto/timetable.rst index 767bfa4f16f87..b7bf0b9820aa3 100644 --- a/docs/apache-airflow/howto/timetable.rst +++ b/docs/apache-airflow/howto/timetable.rst @@ -196,7 +196,7 @@ For reference, here's our plugin and DAG files in their entirety: from airflow import DAG from airflow.example_dags.plugins.workday import AfterWorkdayTimetable - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator with DAG( diff --git a/docs/apache-airflow/operators-and-hooks-ref.rst b/docs/apache-airflow/operators-and-hooks-ref.rst index 0a2abcc841057..a0307f51f0634 100644 --- a/docs/apache-airflow/operators-and-hooks-ref.rst +++ b/docs/apache-airflow/operators-and-hooks-ref.rst @@ -53,7 +53,7 @@ For details see: :doc:`apache-airflow-providers:operators-and-hooks-ref/index`. * - :mod:`airflow.operators.branch` - - * - :mod:`airflow.operators.empty` + * - :mod:`airflow.providers.standard.operators.empty` - * - :mod:`airflow.operators.email` diff --git a/docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.py b/docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.py index 70b68487c2af3..661fb5fd9e222 100644 --- a/docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.py +++ b/docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.py @@ -25,7 +25,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator now = pendulum.now(tz="UTC") now_to_the_hour = (now - datetime.timedelta(0, 0, 0, 0, 0, 3)).replace(minute=0, second=0, microsecond=0) diff --git a/newsfragments/41368.significant.rst b/newsfragments/41368.significant.rst index 2ae517e7ce430..45928ec8c548b 100644 --- a/newsfragments/41368.significant.rst +++ b/newsfragments/41368.significant.rst @@ -30,10 +30,10 @@ For example, instead of ``from airflow.sensors import TimeDeltaSensor``, use ``f * [x] ``airflow.operators.bash_operator.BashOperator`` → ``airflow.operators.bash.BashOperator`` * [x] ``airflow.operators.branch_operator.BaseBranchOperator`` → ``airflow.operators.branch.BaseBranchOperator`` - * [x] ``airflow.operators....EmptyOperator`` → ``airflow.operators.empty.EmptyOperator`` - * [x] ``airflow.operators....DummyOperator`` → ``airflow.operators.empty.EmptyOperator`` - * [x] ``airflow.operators.dummy_operator.EmptyOperator`` → ``airflow.operators.empty.EmptyOperator`` - * [x] ``airflow.operators.dummy_operator.DummyOperator`` → ``airflow.operators.empty.EmptyOperator`` + * [ ] ``airflow.operators....EmptyOperator`` → ``airflow.providers.standard.operators.empty.EmptyOperator`` + * [ ] ``airflow.operators....DummyOperator`` → ``airflow.providers.standard.operators.empty.EmptyOperator`` + * [ ] ``airflow.operators.dummy_operator.EmptyOperator`` → ``airflow.providers.standard.operators.empty.EmptyOperator`` + * [ ] ``airflow.operators.dummy_operator.DummyOperator`` → ``airflow.providers.standard.operators.empty.EmptyOperator`` * [x] ``airflow.operators.email_operator.EmailOperator`` → ``airflow.operators.email.EmailOperator`` * [x] ``airflow.sensors.base_sensor_operator.BaseSensorOperator`` → ``airflow.sensors.base.BaseSensorOperator`` * [x] ``airflow.sensors.date_time_sensor.DateTimeSensor`` → ``airflow.sensors.date_time.DateTimeSensor`` diff --git a/newsfragments/46231.significant.rst b/newsfragments/46231.significant.rst new file mode 100644 index 0000000000000..8d9081c1c692a --- /dev/null +++ b/newsfragments/46231.significant.rst @@ -0,0 +1,25 @@ +.. Moving EmptyOperator from Airflow core to the ``standard`` provider. + +.. EmptyOperator has been moved from Airflow core (``airflow.operators directory``) to the ``standard`` provider. +For new and existing DAGs, users must import ``EmptyOperator`` from ``airflow.providers.standard.operators.empty``. + +* Types of change + + * [x] Dag changes + * [ ] Config changes + * [ ] API changes + * [ ] CLI changes + * [ ] Behaviour changes + * [ ] Plugin changes + * [ ] Dependency changes + * [ ] Code interface changes + +.. List the migration rules needed for this change (see https://github.com/apache/airflow/issues/41641) + +* Migration rules needed + + * ruff + + * AIR302 + + * [ ] ``airflow.operators....EmptyOperator`` → ``airflow.providers.standard.operators.empty.EmptyOperator`` diff --git a/providers/apprise/tests/provider_tests/apprise/notifications/test_apprise.py b/providers/apprise/tests/provider_tests/apprise/notifications/test_apprise.py index b95d49459c233..2aafde91359cd 100644 --- a/providers/apprise/tests/provider_tests/apprise/notifications/test_apprise.py +++ b/providers/apprise/tests/provider_tests/apprise/notifications/test_apprise.py @@ -22,11 +22,11 @@ import pytest from apprise import NotifyFormat, NotifyType -from airflow.operators.empty import EmptyOperator from airflow.providers.apprise.notifications.apprise import ( AppriseNotifier, send_apprise_notification, ) +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/providers/atlassian/jira/tests/provider_tests/atlassian/jira/notifications/test_jira.py b/providers/atlassian/jira/tests/provider_tests/atlassian/jira/notifications/test_jira.py index 438d9e228e058..de372214837c6 100644 --- a/providers/atlassian/jira/tests/provider_tests/atlassian/jira/notifications/test_jira.py +++ b/providers/atlassian/jira/tests/provider_tests/atlassian/jira/notifications/test_jira.py @@ -21,9 +21,9 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.atlassian.jira.hooks.jira import JiraHook from airflow.providers.atlassian.jira.notifications.jira import JiraNotifier, send_jira_notification +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/providers/common/io/tests/provider_tests/common/io/xcom/test_backend.py b/providers/common/io/tests/provider_tests/common/io/xcom/test_backend.py index 5b9b58b6adc6b..da5df7feb3c40 100644 --- a/providers/common/io/tests/provider_tests/common/io/xcom/test_backend.py +++ b/providers/common/io/tests/provider_tests/common/io/xcom/test_backend.py @@ -21,8 +21,8 @@ import airflow.models.xcom from airflow.models.xcom import BaseXCom, resolve_xcom_backend -from airflow.operators.empty import EmptyOperator from airflow.providers.common.io.xcom.backend import XComObjectStorageBackend +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.xcom import XCOM_RETURN_KEY diff --git a/providers/common/sql/tests/provider_tests/common/sql/operators/test_sql.py b/providers/common/sql/tests/provider_tests/common/sql/operators/test_sql.py index 0a6db5665deb3..0953808e54f37 100644 --- a/providers/common/sql/tests/provider_tests/common/sql/operators/test_sql.py +++ b/providers/common/sql/tests/provider_tests/common/sql/operators/test_sql.py @@ -27,7 +27,6 @@ from airflow import DAG from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from airflow.models import Connection, DagRun, TaskInstance as TI, XCom -from airflow.operators.empty import EmptyOperator from airflow.providers.common.sql.hooks.sql import fetch_all_handler from airflow.providers.common.sql.operators.sql import ( BaseSQLOperator, @@ -41,6 +40,7 @@ SQLValueCheckOperator, ) from airflow.providers.postgres.hooks.postgres import PostgresHook +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State diff --git a/providers/dbt/cloud/tests/system/dbt/cloud/example_dbt_cloud.py b/providers/dbt/cloud/tests/system/dbt/cloud/example_dbt_cloud.py index b36f7439fd698..9f0b9ed06de75 100644 --- a/providers/dbt/cloud/tests/system/dbt/cloud/example_dbt_cloud.py +++ b/providers/dbt/cloud/tests/system/dbt/cloud/example_dbt_cloud.py @@ -19,13 +19,13 @@ from datetime import datetime from airflow.models import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.dbt.cloud.operators.dbt import ( DbtCloudGetJobRunArtifactOperator, DbtCloudListJobsOperator, DbtCloudRunJobOperator, ) from airflow.providers.dbt.cloud.sensors.dbt import DbtCloudJobRunSensor +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label from tests_common.test_utils.system_tests import get_test_env_id diff --git a/providers/edge/src/airflow/providers/edge/example_dags/integration_test.py b/providers/edge/src/airflow/providers/edge/example_dags/integration_test.py index 777a85ef2dd99..69d8dabdc0f96 100644 --- a/providers/edge/src/airflow/providers/edge/example_dags/integration_test.py +++ b/providers/edge/src/airflow/providers/edge/example_dags/integration_test.py @@ -31,8 +31,8 @@ from airflow.hooks.base import BaseHook from airflow.models.dag import DAG from airflow.models.variable import Variable -from airflow.operators.empty import EmptyOperator from airflow.providers.common.compat.standard.operators import PythonOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk import Param from airflow.utils.trigger_rule import TriggerRule diff --git a/providers/edge/src/airflow/providers/edge/example_dags/win_test.py b/providers/edge/src/airflow/providers/edge/example_dags/win_test.py index 630092180b590..075a5b9a38c01 100644 --- a/providers/edge/src/airflow/providers/edge/example_dags/win_test.py +++ b/providers/edge/src/airflow/providers/edge/example_dags/win_test.py @@ -38,7 +38,7 @@ from airflow.models import BaseOperator from airflow.models.dag import DAG from airflow.models.variable import Variable -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk import Param from airflow.utils.operator_helpers import context_to_airflow_vars from airflow.utils.trigger_rule import TriggerRule diff --git a/providers/edge/tests/provider_tests/edge/worker_api/routes/test_logs.py b/providers/edge/tests/provider_tests/edge/worker_api/routes/test_logs.py index 45da5fb02bca1..debb0b394edab 100644 --- a/providers/edge/tests/provider_tests/edge/worker_api/routes/test_logs.py +++ b/providers/edge/tests/provider_tests/edge/worker_api/routes/test_logs.py @@ -20,10 +20,10 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.edge.models.edge_logs import EdgeLogsModel from airflow.providers.edge.worker_api.datamodels import PushLogsBody from airflow.providers.edge.worker_api.routes.logs import logfile_path, push_logs +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session diff --git a/providers/fab/tests/provider_tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py b/providers/fab/tests/provider_tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py index 2d5177256b273..852c4288bbe31 100644 --- a/providers/fab/tests/provider_tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py +++ b/providers/fab/tests/provider_tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py @@ -24,8 +24,8 @@ from airflow.models.dagrun import DagRun from airflow.models.taskinstance import TaskInstance from airflow.models.xcom import BaseXCom, XCom -from airflow.operators.empty import EmptyOperator from airflow.providers.fab.www.security import permissions +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.types import DagRunType diff --git a/providers/jdbc/tests/system/jdbc/example_jdbc_queries.py b/providers/jdbc/tests/system/jdbc/example_jdbc_queries.py index 5e73c22b3cf15..aed6d4e4920d0 100644 --- a/providers/jdbc/tests/system/jdbc/example_jdbc_queries.py +++ b/providers/jdbc/tests/system/jdbc/example_jdbc_queries.py @@ -23,8 +23,8 @@ from datetime import datetime, timedelta from airflow import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator +from airflow.providers.standard.operators.empty import EmptyOperator ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID") DAG_ID = "example_jdbc_operator" diff --git a/providers/openlineage/tests/provider_tests/openlineage/plugins/test_adapter.py b/providers/openlineage/tests/provider_tests/openlineage/plugins/test_adapter.py index 3acdacee09f44..0c9ce1b88d625 100644 --- a/providers/openlineage/tests/provider_tests/openlineage/plugins/test_adapter.py +++ b/providers/openlineage/tests/provider_tests/openlineage/plugins/test_adapter.py @@ -40,7 +40,6 @@ from airflow import DAG from airflow.models.dagrun import DagRun, DagRunState from airflow.models.taskinstance import TaskInstance, TaskInstanceState -from airflow.operators.empty import EmptyOperator from airflow.providers.openlineage.conf import namespace from airflow.providers.openlineage.extractors import OperatorLineage from airflow.providers.openlineage.plugins.adapter import _PRODUCER, OpenLineageAdapter @@ -50,6 +49,7 @@ AirflowStateRunFacet, ) from airflow.providers.openlineage.utils.utils import get_airflow_job_facet +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.task_group import TaskGroup from tests_common.test_utils.compat import BashOperator diff --git a/providers/openlineage/tests/provider_tests/openlineage/utils/test_selective_enable.py b/providers/openlineage/tests/provider_tests/openlineage/utils/test_selective_enable.py index e950a4f29d822..012342aebbfeb 100644 --- a/providers/openlineage/tests/provider_tests/openlineage/utils/test_selective_enable.py +++ b/providers/openlineage/tests/provider_tests/openlineage/utils/test_selective_enable.py @@ -21,7 +21,6 @@ from airflow.decorators import dag, task from airflow.models import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.openlineage.utils.selective_enable import ( DISABLE_OL_PARAM, ENABLE_OL_PARAM, @@ -29,6 +28,7 @@ disable_lineage, enable_lineage, ) +from airflow.providers.standard.operators.empty import EmptyOperator class TestOpenLineageSelectiveEnable: diff --git a/providers/openlineage/tests/provider_tests/openlineage/utils/test_utils.py b/providers/openlineage/tests/provider_tests/openlineage/utils/test_utils.py index fb1b8cf984990..86295c98004ca 100644 --- a/providers/openlineage/tests/provider_tests/openlineage/utils/test_utils.py +++ b/providers/openlineage/tests/provider_tests/openlineage/utils/test_utils.py @@ -26,7 +26,6 @@ from airflow.models.baseoperator import BaseOperator from airflow.models.dagrun import DagRun from airflow.models.taskinstance import TaskInstance, TaskInstanceState -from airflow.operators.empty import EmptyOperator from airflow.providers.openlineage.plugins.facets import AirflowDagRunFacet, AirflowJobFacet from airflow.providers.openlineage.utils.utils import ( _get_task_groups_details, @@ -38,6 +37,7 @@ get_operator_class, get_user_provided_run_facets, ) +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.serialization.serialized_objects import SerializedBaseOperator from airflow.utils.task_group import TaskGroup from airflow.utils.types import DagRunType @@ -374,7 +374,7 @@ def sum_values(values: list[int]) -> int: ], }, "task_4.test.dot": { - "operator": "airflow.operators.empty.EmptyOperator", + "operator": "airflow.providers.standard.operators.empty.EmptyOperator", "task_group": None, "emits_ol_events": False, "ui_color": EmptyOperator.ui_color, @@ -424,7 +424,7 @@ def sum_values(values: list[int]) -> int: ], }, "section_1.section_2.task_11": { - "operator": "airflow.operators.empty.EmptyOperator", + "operator": "airflow.providers.standard.operators.empty.EmptyOperator", "task_group": "section_1.section_2", "emits_ol_events": False, "ui_color": EmptyOperator.ui_color, diff --git a/providers/opsgenie/tests/provider_tests/opsgenie/notifications/test_opsgenie.py b/providers/opsgenie/tests/provider_tests/opsgenie/notifications/test_opsgenie.py index d5915c35579b5..feb397e4dcf2a 100644 --- a/providers/opsgenie/tests/provider_tests/opsgenie/notifications/test_opsgenie.py +++ b/providers/opsgenie/tests/provider_tests/opsgenie/notifications/test_opsgenie.py @@ -21,9 +21,9 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.opsgenie.hooks.opsgenie import OpsgenieAlertHook from airflow.providers.opsgenie.notifications.opsgenie import OpsgenieNotifier, send_opsgenie_notification +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/providers/pagerduty/tests/provider_tests/pagerduty/notifications/test_pagerduty.py b/providers/pagerduty/tests/provider_tests/pagerduty/notifications/test_pagerduty.py index b92623b4ccd11..69db5edcfb4bc 100644 --- a/providers/pagerduty/tests/provider_tests/pagerduty/notifications/test_pagerduty.py +++ b/providers/pagerduty/tests/provider_tests/pagerduty/notifications/test_pagerduty.py @@ -21,12 +21,12 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.pagerduty.hooks.pagerduty_events import PagerdutyEventsHook from airflow.providers.pagerduty.notifications.pagerduty import ( PagerdutyNotifier, send_pagerduty_notification, ) +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/providers/redis/tests/provider_tests/redis/log/test_redis_task_handler.py b/providers/redis/tests/provider_tests/redis/log/test_redis_task_handler.py index 32d80bf07a980..8d3081b028057 100644 --- a/providers/redis/tests/provider_tests/redis/log/test_redis_task_handler.py +++ b/providers/redis/tests/provider_tests/redis/log/test_redis_task_handler.py @@ -23,8 +23,8 @@ import pytest from airflow.models import DAG, DagRun, TaskInstance -from airflow.operators.empty import EmptyOperator from airflow.providers.redis.log.redis_task_handler import RedisTaskHandler +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.timezone import datetime diff --git a/providers/slack/tests/provider_tests/slack/notifications/test_slack.py b/providers/slack/tests/provider_tests/slack/notifications/test_slack.py index 8fba3a9d8c07f..eb9d04f8b10a4 100644 --- a/providers/slack/tests/provider_tests/slack/notifications/test_slack.py +++ b/providers/slack/tests/provider_tests/slack/notifications/test_slack.py @@ -21,8 +21,8 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.slack.notifications.slack import SlackNotifier, send_slack_notification +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/providers/slack/tests/provider_tests/slack/notifications/test_slack_webhook.py b/providers/slack/tests/provider_tests/slack/notifications/test_slack_webhook.py index f1a2674f0860f..db5c5a1f94dd1 100644 --- a/providers/slack/tests/provider_tests/slack/notifications/test_slack_webhook.py +++ b/providers/slack/tests/provider_tests/slack/notifications/test_slack_webhook.py @@ -21,11 +21,11 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.slack.notifications.slack_webhook import ( SlackWebhookNotifier, send_slack_webhook_notification, ) +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/providers/standard/provider.yaml b/providers/standard/provider.yaml index e5693cdc58c50..b0e79dbf124d5 100644 --- a/providers/standard/provider.yaml +++ b/providers/standard/provider.yaml @@ -44,6 +44,7 @@ operators: - airflow.providers.standard.operators.weekday - airflow.providers.standard.operators.bash - airflow.providers.standard.operators.python + - airflow.providers.standard.operators.empty - airflow.providers.standard.operators.generic_transfer - airflow.providers.standard.operators.trigger_dagrun - airflow.providers.standard.operators.latest_only diff --git a/providers/standard/src/airflow/providers/standard/get_provider_info.py b/providers/standard/src/airflow/providers/standard/get_provider_info.py index a176fa6cb37bc..2c510fc702994 100644 --- a/providers/standard/src/airflow/providers/standard/get_provider_info.py +++ b/providers/standard/src/airflow/providers/standard/get_provider_info.py @@ -49,6 +49,7 @@ def get_provider_info(): "airflow.providers.standard.operators.weekday", "airflow.providers.standard.operators.bash", "airflow.providers.standard.operators.python", + "airflow.providers.standard.operators.empty", "airflow.providers.standard.operators.generic_transfer", "airflow.providers.standard.operators.trigger_dagrun", "airflow.providers.standard.operators.latest_only", diff --git a/airflow/operators/empty.py b/providers/standard/src/airflow/providers/standard/operators/empty.py similarity index 100% rename from airflow/operators/empty.py rename to providers/standard/src/airflow/providers/standard/operators/empty.py diff --git a/providers/standard/src/airflow/providers/standard/operators/weekday.py b/providers/standard/src/airflow/providers/standard/operators/weekday.py index cd5c787e0ad0a..4d34e0232fabf 100644 --- a/providers/standard/src/airflow/providers/standard/operators/weekday.py +++ b/providers/standard/src/airflow/providers/standard/operators/weekday.py @@ -43,7 +43,7 @@ class BranchDayOfWeekOperator(BaseBranchOperator): .. code-block:: python - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.operators.weekday import BranchDayOfWeekOperator monday = EmptyOperator(task_id="monday") @@ -64,7 +64,7 @@ class BranchDayOfWeekOperator(BaseBranchOperator): # import WeekDay Enum from airflow.utils.weekday import WeekDay - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.operators.weekday import BranchDayOfWeekOperator workday = EmptyOperator(task_id="workday") diff --git a/providers/standard/src/airflow/providers/standard/sensors/external_task.py b/providers/standard/src/airflow/providers/standard/sensors/external_task.py index ad2aa89613fa1..ecbec9514473e 100644 --- a/providers/standard/src/airflow/providers/standard/sensors/external_task.py +++ b/providers/standard/src/airflow/providers/standard/sensors/external_task.py @@ -29,7 +29,7 @@ from airflow.models.dag import DagModel from airflow.models.dagbag import DagBag from airflow.models.taskinstance import TaskInstance -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.triggers.external_task import WorkflowTrigger from airflow.providers.standard.utils.sensor_helper import _get_count, _get_external_task_group_task_ids from airflow.sensors.base import BaseSensorOperator diff --git a/providers/standard/tests/provider_tests/standard/operators/test_datetime.py b/providers/standard/tests/provider_tests/standard/operators/test_datetime.py index 67f72f2c6e2f0..b15ab5a117d7a 100644 --- a/providers/standard/tests/provider_tests/standard/operators/test_datetime.py +++ b/providers/standard/tests/provider_tests/standard/operators/test_datetime.py @@ -25,8 +25,8 @@ from airflow.exceptions import AirflowException from airflow.models.dagrun import DagRun from airflow.models.taskinstance import TaskInstance as TI -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.datetime import BranchDateTimeOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State diff --git a/providers/standard/tests/provider_tests/standard/operators/test_latest_only_operator.py b/providers/standard/tests/provider_tests/standard/operators/test_latest_only_operator.py index 5884c54774c39..c027ecd6e2c69 100644 --- a/providers/standard/tests/provider_tests/standard/operators/test_latest_only_operator.py +++ b/providers/standard/tests/provider_tests/standard/operators/test_latest_only_operator.py @@ -24,7 +24,7 @@ from airflow import settings from airflow.models import DagRun, TaskInstance -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.latest_only import LatestOnlyOperator from airflow.utils import timezone from airflow.utils.state import State diff --git a/providers/standard/tests/provider_tests/standard/operators/test_python.py b/providers/standard/tests/provider_tests/standard/operators/test_python.py index 8ec569c8d22f8..d87de0f62dfb4 100644 --- a/providers/standard/tests/provider_tests/standard/operators/test_python.py +++ b/providers/standard/tests/provider_tests/standard/operators/test_python.py @@ -50,7 +50,7 @@ from airflow.models.baseoperator import BaseOperator from airflow.models.dag import DAG from airflow.models.taskinstance import TaskInstance, clear_task_instances, set_current_context -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import ( BranchExternalPythonOperator, BranchPythonOperator, diff --git a/providers/standard/tests/provider_tests/standard/operators/test_weekday.py b/providers/standard/tests/provider_tests/standard/operators/test_weekday.py index 1a182e9bbfcd5..c1d13b16510e3 100644 --- a/providers/standard/tests/provider_tests/standard/operators/test_weekday.py +++ b/providers/standard/tests/provider_tests/standard/operators/test_weekday.py @@ -26,7 +26,7 @@ from airflow.models.dagrun import DagRun from airflow.models.taskinstance import TaskInstance as TI from airflow.models.xcom import XCom -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.weekday import BranchDayOfWeekOperator from airflow.utils import timezone from airflow.utils.session import create_session diff --git a/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py b/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py index 00ae11b90fa89..839b644f998a2 100644 --- a/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py +++ b/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py @@ -29,10 +29,10 @@ from watchtower import CloudWatchLogHandler from airflow.models import DAG, DagRun, TaskInstance -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.hooks.logs import AwsLogsHook from airflow.providers.amazon.aws.log.cloudwatch_task_handler import CloudwatchTaskHandler from airflow.providers.amazon.aws.utils import datetime_to_epoch_utc_ms +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.state import State from airflow.utils.timezone import datetime diff --git a/providers/tests/amazon/aws/log/test_s3_task_handler.py b/providers/tests/amazon/aws/log/test_s3_task_handler.py index dca9930c322bd..7bf4110e90dfd 100644 --- a/providers/tests/amazon/aws/log/test_s3_task_handler.py +++ b/providers/tests/amazon/aws/log/test_s3_task_handler.py @@ -28,9 +28,9 @@ from moto import mock_aws from airflow.models import DAG, DagRun, TaskInstance -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.hooks.s3 import S3Hook from airflow.providers.amazon.aws.log.s3_task_handler import S3TaskHandler +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.state import State, TaskInstanceState from airflow.utils.timezone import datetime diff --git a/providers/tests/amazon/aws/notifications/test_chime.py b/providers/tests/amazon/aws/notifications/test_chime.py index 022a1b35a507a..0ed86e561a6ae 100644 --- a/providers/tests/amazon/aws/notifications/test_chime.py +++ b/providers/tests/amazon/aws/notifications/test_chime.py @@ -22,9 +22,9 @@ import pytest from airflow.models import Connection -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.hooks.chime import ChimeWebhookHook from airflow.providers.amazon.aws.notifications.chime import ChimeNotifier, send_chime_notification +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import db pytestmark = pytest.mark.db_test diff --git a/providers/tests/amazon/aws/notifications/test_sns.py b/providers/tests/amazon/aws/notifications/test_sns.py index 75876228f0518..7cf88de3de1ef 100644 --- a/providers/tests/amazon/aws/notifications/test_sns.py +++ b/providers/tests/amazon/aws/notifications/test_sns.py @@ -20,8 +20,8 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.notifications.sns import SnsNotifier, send_sns_notification +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.types import NOTSET PARAM_DEFAULT_VALUE = pytest.param(NOTSET, id="default-value") diff --git a/providers/tests/amazon/aws/notifications/test_sqs.py b/providers/tests/amazon/aws/notifications/test_sqs.py index 4ace17eee3dd7..a4d5aab2db3d5 100644 --- a/providers/tests/amazon/aws/notifications/test_sqs.py +++ b/providers/tests/amazon/aws/notifications/test_sqs.py @@ -20,8 +20,8 @@ import pytest -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.notifications.sqs import SqsNotifier, send_sqs_notification +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.types import NOTSET PARAM_DEFAULT_VALUE = pytest.param(NOTSET, id="default-value") diff --git a/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py b/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py index 2a600d6fc575b..b1d1585d0127c 100644 --- a/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py +++ b/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py @@ -31,7 +31,6 @@ from airflow import __version__ from airflow.exceptions import AirflowException from airflow.models.taskinstancekey import TaskInstanceKey -from airflow.operators.empty import EmptyOperator from airflow.providers.cncf.kubernetes import pod_generator from airflow.providers.cncf.kubernetes.executors.kubernetes_executor import ( KubernetesExecutor, @@ -53,6 +52,7 @@ create_unique_id, get_logs_task_metadata, ) +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.state import State, TaskInstanceState diff --git a/providers/tests/databricks/operators/test_databricks_workflow.py b/providers/tests/databricks/operators/test_databricks_workflow.py index acfd9bf9a7d37..463b90cc0555a 100644 --- a/providers/tests/databricks/operators/test_databricks_workflow.py +++ b/providers/tests/databricks/operators/test_databricks_workflow.py @@ -24,7 +24,6 @@ from airflow import DAG from airflow.exceptions import AirflowException from airflow.models.baseoperator import BaseOperator -from airflow.operators.empty import EmptyOperator from airflow.providers.databricks.hooks.databricks import RunLifeCycleState from airflow.providers.databricks.operators.databricks_workflow import ( DatabricksWorkflowTaskGroup, @@ -32,6 +31,7 @@ _CreateDatabricksWorkflowOperator, _flatten_node, ) +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone pytestmark = pytest.mark.db_test diff --git a/providers/tests/smtp/notifications/test_smtp.py b/providers/tests/smtp/notifications/test_smtp.py index 828c671c84252..aa95f3c6f2fba 100644 --- a/providers/tests/smtp/notifications/test_smtp.py +++ b/providers/tests/smtp/notifications/test_smtp.py @@ -23,12 +23,12 @@ import pytest from airflow.configuration import conf -from airflow.operators.empty import EmptyOperator from airflow.providers.smtp.hooks.smtp import SmtpHook from airflow.providers.smtp.notifications.smtp import ( SmtpNotifier, send_smtp_notification, ) +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from tests_common.test_utils.config import conf_vars diff --git a/providers/tests/system/amazon/aws/example_bedrock.py b/providers/tests/system/amazon/aws/example_bedrock.py index bc28be30174e0..1bc050ffd5109 100644 --- a/providers/tests/system/amazon/aws/example_bedrock.py +++ b/providers/tests/system/amazon/aws/example_bedrock.py @@ -25,7 +25,6 @@ from airflow.decorators import task, task_group from airflow.models.baseoperator import chain from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.hooks.bedrock import BedrockHook from airflow.providers.amazon.aws.operators.bedrock import ( BedrockCreateProvisionedModelThroughputOperator, @@ -41,6 +40,7 @@ BedrockCustomizeModelCompletedSensor, BedrockProvisionModelThroughputCompletedSensor, ) +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label from airflow.utils.trigger_rule import TriggerRule diff --git a/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py b/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py index c161419ccaba2..86e9a1932704b 100644 --- a/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py +++ b/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py @@ -36,7 +36,6 @@ from airflow import DAG from airflow.decorators import task, task_group from airflow.models.baseoperator import chain -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.hooks.bedrock import BedrockAgentHook from airflow.providers.amazon.aws.hooks.opensearch_serverless import OpenSearchServerlessHook from airflow.providers.amazon.aws.hooks.s3 import S3Hook @@ -58,6 +57,7 @@ OpenSearchServerlessCollectionActiveSensor, ) from airflow.providers.amazon.aws.utils import get_botocore_version +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label from airflow.utils.trigger_rule import TriggerRule diff --git a/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py b/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py index 989fe79b2d9f6..641962aa636d7 100644 --- a/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py +++ b/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py @@ -26,9 +26,9 @@ from airflow.decorators import task, task_group from airflow.models.baseoperator import chain from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.amazon.aws.operators.s3 import S3CreateBucketOperator, S3DeleteBucketOperator from airflow.providers.amazon.aws.transfers.dynamodb_to_s3 import DynamoDBToS3Operator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label from airflow.utils.trigger_rule import TriggerRule diff --git a/providers/tests/system/example_empty.py b/providers/tests/system/example_empty.py index d2d362012c633..ca81ea08d0be5 100644 --- a/providers/tests/system/example_empty.py +++ b/providers/tests/system/example_empty.py @@ -20,7 +20,7 @@ from airflow.models.baseoperator import chain from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator DAG_ID = "example_empty" diff --git a/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py b/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py index e65524b3c746b..e9f69ec47f5b8 100644 --- a/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py +++ b/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py @@ -22,12 +22,12 @@ from airflow.models import DAG from airflow.models.xcom_arg import XComArg +from airflow.providers.microsoft.azure.operators.data_factory import AzureDataFactoryRunPipelineOperator +from airflow.providers.microsoft.azure.sensors.data_factory import AzureDataFactoryPipelineRunStatusSensor # Ignore missing args provided by default_args # mypy: disable-error-code="call-arg" -from airflow.operators.empty import EmptyOperator -from airflow.providers.microsoft.azure.operators.data_factory import AzureDataFactoryRunPipelineOperator -from airflow.providers.microsoft.azure.sensors.data_factory import AzureDataFactoryPipelineRunStatusSensor +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID") diff --git a/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py b/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py index 589f840e46ab9..69b4d23916f19 100644 --- a/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py +++ b/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py @@ -20,8 +20,8 @@ from datetime import datetime from airflow.models import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.microsoft.azure.operators.synapse import AzureSynapseRunPipelineOperator +from airflow.providers.standard.operators.empty import EmptyOperator ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID") diff --git a/providers/tests/system/microsoft/winrm/example_winrm.py b/providers/tests/system/microsoft/winrm/example_winrm.py index 1c7e31ed6752e..0493c9aaae1d9 100644 --- a/providers/tests/system/microsoft/winrm/example_winrm.py +++ b/providers/tests/system/microsoft/winrm/example_winrm.py @@ -28,14 +28,14 @@ from datetime import datetime, timedelta from airflow import DAG +from airflow.providers.microsoft.winrm.hooks.winrm import WinRMHook +from airflow.providers.microsoft.winrm.operators.winrm import WinRMOperator # -------------------------------------------------------------------------------- # Caveat: This Dag will not run because of missing scripts. # The purpose of this is to give you a sample of a real world example DAG! # -------------------------------------------------------------------------------- -from airflow.operators.empty import EmptyOperator -from airflow.providers.microsoft.winrm.hooks.winrm import WinRMHook -from airflow.providers.microsoft.winrm.operators.winrm import WinRMOperator +from airflow.providers.standard.operators.empty import EmptyOperator ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID") DAG_ID = "POC_winrm_parallel" diff --git a/providers/tests/system/yandex/example_yandexcloud_yq.py b/providers/tests/system/yandex/example_yandexcloud_yq.py index 474e3018ca7ee..6afb16a3b0f25 100644 --- a/providers/tests/system/yandex/example_yandexcloud_yq.py +++ b/providers/tests/system/yandex/example_yandexcloud_yq.py @@ -19,7 +19,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.yandex.operators.yq import YQExecuteQueryOperator from tests_common.test_utils.system_tests import get_test_env_id diff --git a/task_sdk/src/airflow/sdk/definitions/mappedoperator.py b/task_sdk/src/airflow/sdk/definitions/mappedoperator.py index 00bd2ab8ab2f9..dddeaf21cf2bc 100644 --- a/task_sdk/src/airflow/sdk/definitions/mappedoperator.py +++ b/task_sdk/src/airflow/sdk/definitions/mappedoperator.py @@ -205,7 +205,7 @@ def expand_kwargs(self, kwargs: OperatorExpandKwargsArgument, *, strict: bool = return self._expand(ListOfDictsExpandInput(kwargs), strict=strict) def _expand(self, expand_input: ExpandInput, *, strict: bool) -> MappedOperator: - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sensors.base import BaseSensorOperator self._expand_called = True diff --git a/task_sdk/tests/definitions/test_asset.py b/task_sdk/tests/definitions/test_asset.py index 4c96b85dec29a..767cd9e1be714 100644 --- a/task_sdk/tests/definitions/test_asset.py +++ b/task_sdk/tests/definitions/test_asset.py @@ -23,7 +23,7 @@ import pytest -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import ( Asset, AssetAlias, diff --git a/tests/api/common/test_mark_tasks.py b/tests/api/common/test_mark_tasks.py index 124232842d9a0..59fca1f4caaf8 100644 --- a/tests/api/common/test_mark_tasks.py +++ b/tests/api/common/test_mark_tasks.py @@ -21,7 +21,7 @@ import pytest from airflow.api.common.mark_tasks import set_dag_run_state_to_failed, set_dag_run_state_to_success -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.state import TaskInstanceState if TYPE_CHECKING: diff --git a/tests/api_connexion/endpoints/test_dag_endpoint.py b/tests/api_connexion/endpoints/test_dag_endpoint.py index 79190a3664709..3fdde9241423c 100644 --- a/tests/api_connexion/endpoints/test_dag_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_endpoint.py @@ -27,7 +27,7 @@ from airflow.models import DagBag, DagModel from airflow.models.dag import DAG from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.session import provide_session from airflow.utils.state import TaskInstanceState diff --git a/tests/api_connexion/endpoints/test_dag_run_endpoint.py b/tests/api_connexion/endpoints/test_dag_run_endpoint.py index dc3073a475c3d..3ce4019c824d9 100644 --- a/tests/api_connexion/endpoints/test_dag_run_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_run_endpoint.py @@ -30,7 +30,7 @@ from airflow.models.asset import AssetEvent, AssetModel from airflow.models.dag import DAG, DagModel from airflow.models.dagrun import DagRun -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from airflow.sdk.definitions.param import Param from airflow.utils import timezone diff --git a/tests/api_connexion/endpoints/test_log_endpoint.py b/tests/api_connexion/endpoints/test_log_endpoint.py index 4be804424ed7e..e7c89151a7aa4 100644 --- a/tests/api_connexion/endpoints/test_log_endpoint.py +++ b/tests/api_connexion/endpoints/test_log_endpoint.py @@ -29,7 +29,7 @@ from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.decorators import task from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.types import DagRunType diff --git a/tests/api_connexion/endpoints/test_task_endpoint.py b/tests/api_connexion/endpoints/test_task_endpoint.py index 874c5d0508547..f2d3ac70c22f2 100644 --- a/tests/api_connexion/endpoints/test_task_endpoint.py +++ b/tests/api_connexion/endpoints/test_task_endpoint.py @@ -27,7 +27,7 @@ from airflow.models.dag import DAG from airflow.models.expandinput import EXPAND_INPUT_EMPTY from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags @@ -113,7 +113,7 @@ def test_should_respond_200(self): expected = { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [self.task_id2], @@ -157,7 +157,10 @@ def test_should_respond_200(self): def test_mapped_task(self): expected = { - "class_ref": {"class_name": "EmptyOperator", "module_path": "airflow.operators.empty"}, + "class_ref": { + "class_name": "EmptyOperator", + "module_path": "airflow.providers.standard.operators.empty", + }, "depends_on_past": False, "downstream_task_ids": [], "end_date": None, @@ -196,7 +199,7 @@ def test_unscheduled_task(self): expected = { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], @@ -260,7 +263,7 @@ def test_should_respond_200_serialized(self, testing_dag_bundle): expected = { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [self.task_id2], @@ -337,7 +340,7 @@ def test_should_respond_200(self): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [self.task_id2], @@ -376,7 +379,7 @@ def test_should_respond_200(self): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], @@ -418,7 +421,10 @@ def test_get_tasks_mapped(self): expected = { "tasks": [ { - "class_ref": {"class_name": "EmptyOperator", "module_path": "airflow.operators.empty"}, + "class_ref": { + "class_name": "EmptyOperator", + "module_path": "airflow.providers.standard.operators.empty", + }, "depends_on_past": False, "downstream_task_ids": [], "end_date": None, @@ -449,7 +455,7 @@ def test_get_tasks_mapped(self): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], @@ -497,7 +503,7 @@ def test_get_unscheduled_tasks(self): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [downstream_task_id] if downstream_task_id else [], diff --git a/tests/api_connexion/endpoints/test_xcom_endpoint.py b/tests/api_connexion/endpoints/test_xcom_endpoint.py index ba90e28f3ac2d..784bc6142d40d 100644 --- a/tests/api_connexion/endpoints/test_xcom_endpoint.py +++ b/tests/api_connexion/endpoints/test_xcom_endpoint.py @@ -25,7 +25,7 @@ from airflow.models.dagrun import DagRun from airflow.models.taskinstance import TaskInstance from airflow.models.xcom import BaseXCom, XCom, resolve_xcom_backend -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.timezone import utcnow diff --git a/tests/api_connexion/schemas/test_asset_schema.py b/tests/api_connexion/schemas/test_asset_schema.py index ff5a81961e949..732aa9147d7d1 100644 --- a/tests/api_connexion/schemas/test_asset_schema.py +++ b/tests/api_connexion/schemas/test_asset_schema.py @@ -28,7 +28,7 @@ asset_schema, ) from airflow.models.asset import AssetAliasModel, AssetEvent, AssetModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from tests_common.test_utils.db import clear_db_assets, clear_db_dags diff --git a/tests/api_connexion/schemas/test_task_instance_schema.py b/tests/api_connexion/schemas/test_task_instance_schema.py index a14cd7dbbd1ec..7dc2af3a116e1 100644 --- a/tests/api_connexion/schemas/test_task_instance_schema.py +++ b/tests/api_connexion/schemas/test_task_instance_schema.py @@ -27,7 +27,7 @@ task_instance_schema, ) from airflow.models import TaskInstance as TI -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.platform import getuser from airflow.utils.state import State from airflow.utils.timezone import datetime diff --git a/tests/api_connexion/schemas/test_task_schema.py b/tests/api_connexion/schemas/test_task_schema.py index eee51c3aac73a..70d37edf251ca 100644 --- a/tests/api_connexion/schemas/test_task_schema.py +++ b/tests/api_connexion/schemas/test_task_schema.py @@ -19,7 +19,7 @@ from datetime import datetime from airflow.api_connexion.schemas.task_schema import TaskCollection, task_collection_schema, task_schema -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator class TestTaskSchema: @@ -32,7 +32,7 @@ def test_serialize(self): result = task_schema.dump(op) expected = { "class_ref": { - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", "class_name": "EmptyOperator", }, "depends_on_past": False, @@ -75,7 +75,7 @@ def test_serialize(self): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], diff --git a/tests/api_fastapi/core_api/routes/public/test_backfills.py b/tests/api_fastapi/core_api/routes/public/test_backfills.py index 1eeae8b667566..97812dfd91a3a 100644 --- a/tests/api_fastapi/core_api/routes/public/test_backfills.py +++ b/tests/api_fastapi/core_api/routes/public/test_backfills.py @@ -27,7 +27,7 @@ from airflow.models import DagBag, DagModel, DagRun from airflow.models.backfill import Backfill, BackfillDagRun, ReprocessBehavior, _create_backfill from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.utils import timezone from airflow.utils.session import provide_session diff --git a/tests/api_fastapi/core_api/routes/public/test_dag_run.py b/tests/api_fastapi/core_api/routes/public/test_dag_run.py index 3d70f4dbf29f8..de21c23e8d0ae 100644 --- a/tests/api_fastapi/core_api/routes/public/test_dag_run.py +++ b/tests/api_fastapi/core_api/routes/public/test_dag_run.py @@ -27,7 +27,7 @@ from airflow.listeners.listener import get_listener_manager from airflow.models import DagModel, DagRun from airflow.models.asset import AssetEvent, AssetModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from airflow.sdk.definitions.param import Param from airflow.utils import timezone diff --git a/tests/api_fastapi/core_api/routes/public/test_dag_tags.py b/tests/api_fastapi/core_api/routes/public/test_dag_tags.py index 7d7720c76f773..4a058d07f8612 100644 --- a/tests/api_fastapi/core_api/routes/public/test_dag_tags.py +++ b/tests/api_fastapi/core_api/routes/public/test_dag_tags.py @@ -23,7 +23,7 @@ from airflow.models.dag import DagModel, DagTag from airflow.models.dagrun import DagRun -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.session import provide_session from airflow.utils.state import DagRunState from airflow.utils.types import DagRunTriggeredByType, DagRunType diff --git a/tests/api_fastapi/core_api/routes/public/test_dags.py b/tests/api_fastapi/core_api/routes/public/test_dags.py index 8ef4a82613775..99e5bf346ff47 100644 --- a/tests/api_fastapi/core_api/routes/public/test_dags.py +++ b/tests/api_fastapi/core_api/routes/public/test_dags.py @@ -23,7 +23,7 @@ from airflow.models.dag import DagModel, DagTag from airflow.models.dagrun import DagRun -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.session import provide_session from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunTriggeredByType, DagRunType diff --git a/tests/api_fastapi/core_api/routes/public/test_log.py b/tests/api_fastapi/core_api/routes/public/test_log.py index ae1d7df79d35a..2792dd776cf97 100644 --- a/tests/api_fastapi/core_api/routes/public/test_log.py +++ b/tests/api_fastapi/core_api/routes/public/test_log.py @@ -29,7 +29,7 @@ from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.decorators import task from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.types import DagRunType diff --git a/tests/api_fastapi/core_api/routes/public/test_tasks.py b/tests/api_fastapi/core_api/routes/public/test_tasks.py index b2e7671365690..4b54da4bfad22 100644 --- a/tests/api_fastapi/core_api/routes/public/test_tasks.py +++ b/tests/api_fastapi/core_api/routes/public/test_tasks.py @@ -26,7 +26,7 @@ from airflow.models.dagbag import DagBag from airflow.models.expandinput import EXPAND_INPUT_EMPTY from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags @@ -92,7 +92,7 @@ def test_should_respond_200(self, test_client): expected = { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [self.task_id2], @@ -136,7 +136,10 @@ def test_should_respond_200(self, test_client): def test_mapped_task(self, test_client): expected = { - "class_ref": {"class_name": "EmptyOperator", "module_path": "airflow.operators.empty"}, + "class_ref": { + "class_name": "EmptyOperator", + "module_path": "airflow.providers.standard.operators.empty", + }, "depends_on_past": False, "downstream_task_ids": [], "end_date": None, @@ -174,7 +177,7 @@ def test_unscheduled_task(self, test_client): expected = { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], @@ -237,7 +240,7 @@ def test_should_respond_200_serialized(self, test_client, testing_dag_bundle): expected = { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [self.task_id2], @@ -302,7 +305,7 @@ def test_should_respond_200(self, test_client): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [self.task_id2], @@ -341,7 +344,7 @@ def test_should_respond_200(self, test_client): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], @@ -381,7 +384,10 @@ def test_get_tasks_mapped(self, test_client): expected = { "tasks": [ { - "class_ref": {"class_name": "EmptyOperator", "module_path": "airflow.operators.empty"}, + "class_ref": { + "class_name": "EmptyOperator", + "module_path": "airflow.providers.standard.operators.empty", + }, "depends_on_past": False, "downstream_task_ids": [], "end_date": None, @@ -412,7 +418,7 @@ def test_get_tasks_mapped(self, test_client): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [], @@ -458,7 +464,7 @@ def test_get_unscheduled_tasks(self, test_client): { "class_ref": { "class_name": "EmptyOperator", - "module_path": "airflow.operators.empty", + "module_path": "airflow.providers.standard.operators.empty", }, "depends_on_past": False, "downstream_task_ids": [downstream_task_id] if downstream_task_id else [], diff --git a/tests/api_fastapi/core_api/routes/public/test_xcom.py b/tests/api_fastapi/core_api/routes/public/test_xcom.py index b61b22a239898..103ce049426d6 100644 --- a/tests/api_fastapi/core_api/routes/public/test_xcom.py +++ b/tests/api_fastapi/core_api/routes/public/test_xcom.py @@ -25,7 +25,7 @@ from airflow.models.dagrun import DagRun from airflow.models.taskinstance import TaskInstance from airflow.models.xcom import BaseXCom, resolve_xcom_backend -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.types import DagRunType diff --git a/tests/api_fastapi/core_api/routes/ui/test_assets.py b/tests/api_fastapi/core_api/routes/ui/test_assets.py index 4935b25014ea7..48a68d854d37f 100644 --- a/tests/api_fastapi/core_api/routes/ui/test_assets.py +++ b/tests/api_fastapi/core_api/routes/ui/test_assets.py @@ -20,7 +20,7 @@ import pytest -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from tests_common.test_utils.db import initial_db_init diff --git a/tests/api_fastapi/core_api/routes/ui/test_dashboard.py b/tests/api_fastapi/core_api/routes/ui/test_dashboard.py index 416e016e25c95..164c7d63f8418 100644 --- a/tests/api_fastapi/core_api/routes/ui/test_dashboard.py +++ b/tests/api_fastapi/core_api/routes/ui/test_dashboard.py @@ -23,7 +23,7 @@ import pytest from airflow.models import DagBag -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunType diff --git a/tests/api_fastapi/core_api/routes/ui/test_grid.py b/tests/api_fastapi/core_api/routes/ui/test_grid.py index 73819323522da..85248e53d84a0 100644 --- a/tests/api_fastapi/core_api/routes/ui/test_grid.py +++ b/tests/api_fastapi/core_api/routes/ui/test_grid.py @@ -24,7 +24,7 @@ from airflow.decorators import task_group from airflow.models import DagBag -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.state import DagRunState, TaskInstanceState diff --git a/tests/api_fastapi/core_api/routes/ui/test_structure.py b/tests/api_fastapi/core_api/routes/ui/test_structure.py index 3f785715f6156..ca03b8b45cbab 100644 --- a/tests/api_fastapi/core_api/routes/ui/test_structure.py +++ b/tests/api_fastapi/core_api/routes/ui/test_structure.py @@ -25,7 +25,7 @@ from airflow.models import DagBag from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.trigger_dagrun import TriggerDagRunOperator from airflow.providers.standard.sensors.external_task import ExternalTaskSensor from airflow.sdk.definitions.asset import Asset, AssetAlias, Dataset diff --git a/tests/cli/commands/remote_commands/test_dag_command.py b/tests/cli/commands/remote_commands/test_dag_command.py index 04b0ef88104e7..2e6351e7bca91 100644 --- a/tests/cli/commands/remote_commands/test_dag_command.py +++ b/tests/cli/commands/remote_commands/test_dag_command.py @@ -211,7 +211,7 @@ def test_next_execution(self, tmp_path): file_content = os.linesep.join( [ "from airflow import DAG", - "from airflow.operators.empty import EmptyOperator", + "from airflow.providers.standard.operators.empty import EmptyOperator", "from datetime import timedelta; from pendulum import today", f"dag = DAG('{f[0]}', start_date=today() + {f[1]}, schedule={f[2]}, catchup={f[3]})", "task = EmptyOperator(task_id='empty_task',dag=dag)", diff --git a/tests/cli/commands/remote_commands/test_task_command.py b/tests/cli/commands/remote_commands/test_task_command.py index 166f152b9eaee..dc331abd238fa 100644 --- a/tests/cli/commands/remote_commands/test_task_command.py +++ b/tests/cli/commands/remote_commands/test_task_command.py @@ -45,8 +45,8 @@ from airflow.executors.local_executor import LocalExecutor from airflow.models import DagBag, DagRun, Pool, TaskInstance from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State, TaskInstanceState diff --git a/tests/core/test_core.py b/tests/core/test_core.py index 9103a35674690..a1f7326c281e8 100644 --- a/tests/core/test_core.py +++ b/tests/core/test_core.py @@ -25,8 +25,8 @@ from airflow.exceptions import AirflowTaskTimeout from airflow.models import TaskInstance from airflow.models.baseoperator import BaseOperator -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType diff --git a/tests/dag_processing/test_collection.py b/tests/dag_processing/test_collection.py index ac2bfe141c3c0..e3620e473b0a6 100644 --- a/tests/dag_processing/test_collection.py +++ b/tests/dag_processing/test_collection.py @@ -48,7 +48,7 @@ from airflow.models.dag import DAG from airflow.models.errors import ParseImportError from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.triggers.temporal import TimeDeltaTrigger from airflow.sdk.definitions.asset import Asset, AssetWatcher from airflow.serialization.serialized_objects import LazyDeserializedDAG, SerializedDAG diff --git a/tests/dags/test_dag_for_db_queries_counter.py b/tests/dags/test_dag_for_db_queries_counter.py index 36bdaaa05c83b..edd9a34556cb7 100644 --- a/tests/dags/test_dag_for_db_queries_counter.py +++ b/tests/dags/test_dag_for_db_queries_counter.py @@ -20,7 +20,7 @@ import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator args = {"owner": "airflow", "retries": 3, "start_date": datetime.datetime(2022, 1, 1)} diff --git a/tests/dags/test_dag_parsing_context.py b/tests/dags/test_dag_parsing_context.py index acd6a712ee118..6175de6bfef9f 100644 --- a/tests/dags/test_dag_parsing_context.py +++ b/tests/dags/test_dag_parsing_context.py @@ -19,7 +19,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.context import get_parsing_context DAG_ID = "test_dag_parsing_context" diff --git a/tests/dags/test_dag_with_no_tags.py b/tests/dags/test_dag_with_no_tags.py index 835374f33da28..20b4281ea13a1 100644 --- a/tests/dags/test_dag_with_no_tags.py +++ b/tests/dags/test_dag_with_no_tags.py @@ -19,7 +19,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator DEFAULT_DATE = datetime(2016, 1, 1) diff --git a/tests/dags/test_double_trigger.py b/tests/dags/test_double_trigger.py index a6b17de6fae39..a1a1d97561089 100644 --- a/tests/dags/test_double_trigger.py +++ b/tests/dags/test_double_trigger.py @@ -20,7 +20,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator DEFAULT_DATE = datetime(2016, 1, 1) diff --git a/tests/dags/test_example_bash_operator.py b/tests/dags/test_example_bash_operator.py index 52126f0e10206..c4b98c5a74214 100644 --- a/tests/dags/test_example_bash_operator.py +++ b/tests/dags/test_example_bash_operator.py @@ -20,8 +20,8 @@ import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator dag = DAG( dag_id="test_example_bash_operator", diff --git a/tests/dags/test_external_task_sensor_check_existense.py b/tests/dags/test_external_task_sensor_check_existense.py index 656f3760a248c..002a1c79631fb 100644 --- a/tests/dags/test_external_task_sensor_check_existense.py +++ b/tests/dags/test_external_task_sensor_check_existense.py @@ -18,7 +18,7 @@ from __future__ import annotations from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.sensors.external_task import ExternalTaskSensor from tests.models import DEFAULT_DATE diff --git a/tests/dags/test_future_start_date.py b/tests/dags/test_future_start_date.py index b72d2865fd33b..2843ff69b9334 100644 --- a/tests/dags/test_future_start_date.py +++ b/tests/dags/test_future_start_date.py @@ -22,7 +22,7 @@ import pendulum from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator exec_date = pendulum.datetime(2021, 1, 1) diff --git a/tests/dags/test_invalid_cron.py b/tests/dags/test_invalid_cron.py index eddf76f5e79b6..e4d30f7888655 100644 --- a/tests/dags/test_invalid_cron.py +++ b/tests/dags/test_invalid_cron.py @@ -18,7 +18,7 @@ from __future__ import annotations from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.timezone import datetime # This invalid DAG has a schedule specified with an INVALID cron expression. diff --git a/tests/dags/test_invalid_dup_task.py b/tests/dags/test_invalid_dup_task.py index 409f5ae40b105..a3ed6e7443926 100644 --- a/tests/dags/test_invalid_dup_task.py +++ b/tests/dags/test_invalid_dup_task.py @@ -19,7 +19,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator with DAG( "test_invalid_dup_task", diff --git a/tests/dags/test_latest_runs.py b/tests/dags/test_latest_runs.py index 9430274713f40..3244411bcf120 100644 --- a/tests/dags/test_latest_runs.py +++ b/tests/dags/test_latest_runs.py @@ -20,7 +20,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator for i in range(1, 2): dag = DAG(dag_id=f"test_latest_runs_{i}", schedule=None) diff --git a/tests/dags/test_miscellaneous.py b/tests/dags/test_miscellaneous.py index 5bc216bd6dee0..be0e3c4a2ade2 100644 --- a/tests/dags/test_miscellaneous.py +++ b/tests/dags/test_miscellaneous.py @@ -22,7 +22,7 @@ import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from tests_common.test_utils.compat import BashOperator diff --git a/tests/dags/test_missing_owner.py b/tests/dags/test_missing_owner.py index dd3d223e7979c..6741a75150517 100644 --- a/tests/dags/test_missing_owner.py +++ b/tests/dags/test_missing_owner.py @@ -20,7 +20,7 @@ import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="test_missing_owner", diff --git a/tests/dags/test_on_kill.py b/tests/dags/test_on_kill.py index 93ff1f204bc0c..1e73b76776f5b 100644 --- a/tests/dags/test_on_kill.py +++ b/tests/dags/test_on_kill.py @@ -21,7 +21,7 @@ from typing import TYPE_CHECKING from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.timezone import datetime if TYPE_CHECKING: diff --git a/tests/dags/test_only_empty_tasks.py b/tests/dags/test_only_empty_tasks.py index 92c5464982453..d39bed72948c9 100644 --- a/tests/dags/test_only_empty_tasks.py +++ b/tests/dags/test_only_empty_tasks.py @@ -21,7 +21,7 @@ from datetime import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset DEFAULT_DATE = datetime(2016, 1, 1) diff --git a/tests/dags/test_parsing_context.py b/tests/dags/test_parsing_context.py index 4aae5caaf2d81..0a0ab4a4a7d0e 100644 --- a/tests/dags/test_parsing_context.py +++ b/tests/dags/test_parsing_context.py @@ -20,7 +20,7 @@ from pathlib import Path from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.context import ( _AIRFLOW_PARSING_CONTEXT_DAG_ID, _AIRFLOW_PARSING_CONTEXT_TASK_ID, diff --git a/tests/dags/test_scheduler_dags.py b/tests/dags/test_scheduler_dags.py index 98748c50004d1..da89e821986f1 100644 --- a/tests/dags/test_scheduler_dags.py +++ b/tests/dags/test_scheduler_dags.py @@ -20,7 +20,7 @@ from datetime import timedelta from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone DEFAULT_DATE = timezone.datetime(2016, 1, 1) diff --git a/tests/dags/test_with_non_default_owner.py b/tests/dags/test_with_non_default_owner.py index b50325dcaae51..bda961035f809 100644 --- a/tests/dags/test_with_non_default_owner.py +++ b/tests/dags/test_with_non_default_owner.py @@ -20,7 +20,7 @@ import datetime from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="test_with_non_default_owner", diff --git a/tests/dags/test_zip.zip b/tests/dags/test_zip.zip index 24db36fff8b00..9b10cca225752 100644 Binary files a/tests/dags/test_zip.zip and b/tests/dags/test_zip.zip differ diff --git a/tests/dags_corrupted/test_nonstring_owner.py b/tests/dags_corrupted/test_nonstring_owner.py index 5981bee3b48f9..41e65e57bbceb 100644 --- a/tests/dags_corrupted/test_nonstring_owner.py +++ b/tests/dags_corrupted/test_nonstring_owner.py @@ -20,7 +20,7 @@ from datetime import datetime, timedelta from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator with DAG( dag_id="test_nonstring_owner", diff --git a/tests/dags_with_system_exit/b_test_scheduler_dags.py b/tests/dags_with_system_exit/b_test_scheduler_dags.py index 765506f4c32d8..100f6c122d891 100644 --- a/tests/dags_with_system_exit/b_test_scheduler_dags.py +++ b/tests/dags_with_system_exit/b_test_scheduler_dags.py @@ -20,7 +20,7 @@ from datetime import datetime, timedelta from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator DEFAULT_DATE = datetime(2000, 1, 1) diff --git a/tests/decorators/test_task_group.py b/tests/decorators/test_task_group.py index fb38c95759a26..d5fa174fa2511 100644 --- a/tests/decorators/test_task_group.py +++ b/tests/decorators/test_task_group.py @@ -24,7 +24,7 @@ from airflow.decorators import dag, task, task_group from airflow.models.expandinput import DictOfListsExpandInput, ListOfDictsExpandInput, MappedArgument -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.task_group import MappedTaskGroup from airflow.utils.trigger_rule import TriggerRule diff --git a/tests/jobs/test_local_task_job.py b/tests/jobs/test_local_task_job.py index c86599d555c54..4bc128f9fe3e5 100644 --- a/tests/jobs/test_local_task_job.py +++ b/tests/jobs/test_local_task_job.py @@ -41,7 +41,7 @@ from airflow.models.dag import DAG from airflow.models.dagbag import DagBag from airflow.models.taskinstance import TaskInstance -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.task.standard_task_runner import StandardTaskRunner from airflow.utils import timezone diff --git a/tests/jobs/test_scheduler_job.py b/tests/jobs/test_scheduler_job.py index 6b0f5847ce7bf..4d1ed233e61d8 100644 --- a/tests/jobs/test_scheduler_job.py +++ b/tests/jobs/test_scheduler_job.py @@ -61,8 +61,8 @@ from airflow.models.pool import Pool from airflow.models.serialized_dag import SerializedDagModel from airflow.models.taskinstance import TaskInstance -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from airflow.serialization.serialized_objects import SerializedDAG from airflow.timetables.base import DataInterval diff --git a/tests/jobs/test_triggerer_job.py b/tests/jobs/test_triggerer_job.py index c66ddce9ccd20..89f6947fe17ad 100644 --- a/tests/jobs/test_triggerer_job.py +++ b/tests/jobs/test_triggerer_job.py @@ -35,7 +35,7 @@ from airflow.models import DagModel, DagRun, TaskInstance, Trigger from airflow.models.baseoperator import BaseOperator from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.providers.standard.triggers.temporal import DateTimeTrigger, TimeDeltaTrigger from airflow.triggers.base import TriggerEvent diff --git a/tests/lineage/test_lineage.py b/tests/lineage/test_lineage.py index 069d74f540acc..bc88119016910 100644 --- a/tests/lineage/test_lineage.py +++ b/tests/lineage/test_lineage.py @@ -25,8 +25,8 @@ from airflow.lineage import AUTO, apply_lineage, get_backend, prepare_lineage from airflow.lineage.backend import LineageBackend from airflow.models import TaskInstance as TI -from airflow.operators.empty import EmptyOperator from airflow.providers.common.compat.lineage.entities import File +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.context import Context from airflow.utils import timezone from airflow.utils.types import DagRunType diff --git a/tests/listeners/test_asset_listener.py b/tests/listeners/test_asset_listener.py index ace800358f249..94cb452559359 100644 --- a/tests/listeners/test_asset_listener.py +++ b/tests/listeners/test_asset_listener.py @@ -20,7 +20,7 @@ from airflow.listeners.listener import get_listener_manager from airflow.models.asset import AssetModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from airflow.utils.session import provide_session diff --git a/tests/models/test_cleartasks.py b/tests/models/test_cleartasks.py index a469e84406ec0..a420962f5b919 100644 --- a/tests/models/test_cleartasks.py +++ b/tests/models/test_cleartasks.py @@ -29,7 +29,7 @@ from airflow.models.taskinstance import TaskInstance, TaskInstance as TI, clear_task_instances from airflow.models.taskinstancehistory import TaskInstanceHistory from airflow.models.taskreschedule import TaskReschedule -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.sensors.python import PythonSensor from airflow.utils.session import create_session from airflow.utils.state import DagRunState, State, TaskInstanceState diff --git a/tests/models/test_dag.py b/tests/models/test_dag.py index fde7e9eafa62a..15a2ca96df97f 100644 --- a/tests/models/test_dag.py +++ b/tests/models/test_dag.py @@ -66,8 +66,8 @@ from airflow.models.dagrun import DagRun from airflow.models.serialized_dag import SerializedDagModel from airflow.models.taskinstance import TaskInstance as TI -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.sdk import TaskGroup from airflow.sdk.definitions._internal.contextmanager import TaskGroupContext diff --git a/tests/models/test_dag_version.py b/tests/models/test_dag_version.py index 22c1b18ab4b5d..fe09273492e4f 100644 --- a/tests/models/test_dag_version.py +++ b/tests/models/test_dag_version.py @@ -21,7 +21,7 @@ from airflow.models.dag_version import DagVersion from airflow.models.serialized_dag import SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from tests_common.test_utils.db import clear_db_dags diff --git a/tests/models/test_dagbag.py b/tests/models/test_dagbag.py index 384ebab4db4c2..62f5e65037aaf 100644 --- a/tests/models/test_dagbag.py +++ b/tests/models/test_dagbag.py @@ -463,7 +463,7 @@ def test_dag_removed_if_serialized_dag_is_removed(self, dag_maker, tmp_path): Test that if a DAG does not exist in serialized_dag table (as the DAG file was removed), remove dags from the DagBag """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator with dag_maker( dag_id="test_dag_removed_if_serialized_dag_is_removed", @@ -521,7 +521,7 @@ def basic_cycle(): import datetime from airflow.models.dag import DAG - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator dag_name = "cycle_dag" default_args = {"owner": "owner1", "start_date": datetime.datetime(2016, 1, 1)} diff --git a/tests/models/test_dagrun.py b/tests/models/test_dagrun.py index a967f6b25556f..a8972e88e27b0 100644 --- a/tests/models/test_dagrun.py +++ b/tests/models/test_dagrun.py @@ -39,8 +39,8 @@ from airflow.models.taskinstance import TaskInstance, TaskInstanceNote, clear_task_instances from airflow.models.taskmap import TaskMap from airflow.models.taskreschedule import TaskReschedule -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator, ShortCircuitOperator from airflow.serialization.serialized_objects import SerializedDAG from airflow.stats import Stats diff --git a/tests/models/test_deadline.py b/tests/models/test_deadline.py index 3c2497528e2a6..85e8c8e81b54f 100644 --- a/tests/models/test_deadline.py +++ b/tests/models/test_deadline.py @@ -24,7 +24,7 @@ from airflow.models import DagRun from airflow.models.deadline import Deadline -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from tests_common.test_utils import db diff --git a/tests/models/test_pool.py b/tests/models/test_pool.py index b02e0015f623d..587f0fd60cba1 100644 --- a/tests/models/test_pool.py +++ b/tests/models/test_pool.py @@ -23,7 +23,7 @@ from airflow.exceptions import AirflowException, PoolNotFound from airflow.models.pool import Pool from airflow.models.taskinstance import TaskInstance as TI -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State diff --git a/tests/models/test_serialized_dag.py b/tests/models/test_serialized_dag.py index 4d4ee8f8652a5..88004911705f7 100644 --- a/tests/models/test_serialized_dag.py +++ b/tests/models/test_serialized_dag.py @@ -31,8 +31,8 @@ from airflow.models.dag_version import DagVersion from airflow.models.dagbag import DagBag from airflow.models.serialized_dag import SerializedDagModel as SDM -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.sdk.definitions.asset import Asset from airflow.serialization.serialized_objects import SerializedDAG diff --git a/tests/models/test_skipmixin.py b/tests/models/test_skipmixin.py index 7107520930246..5c3654d7e69c5 100644 --- a/tests/models/test_skipmixin.py +++ b/tests/models/test_skipmixin.py @@ -27,7 +27,7 @@ from airflow.exceptions import AirflowException from airflow.models.skipmixin import SkipMixin from airflow.models.taskinstance import TaskInstance as TI -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.state import State from airflow.utils.types import DagRunType diff --git a/tests/models/test_taskinstance.py b/tests/models/test_taskinstance.py index ab43b61cb95e9..2e486a92d5fd6 100644 --- a/tests/models/test_taskinstance.py +++ b/tests/models/test_taskinstance.py @@ -75,8 +75,8 @@ from airflow.models.variable import Variable from airflow.models.xcom import LazyXComSelectSequence, XCom from airflow.notifications.basenotifier import BaseNotifier -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.providers.standard.sensors.python import PythonSensor from airflow.sdk.definitions.asset import Asset, AssetAlias diff --git a/tests/models/test_timestamp.py b/tests/models/test_timestamp.py index bd9fd5d0766f5..912347c602e77 100644 --- a/tests/models/test_timestamp.py +++ b/tests/models/test_timestamp.py @@ -21,7 +21,7 @@ import time_machine from airflow.models import Log -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.state import State diff --git a/tests/models/test_trigger.py b/tests/models/test_trigger.py index c9966b1cb0f24..ce36c7b5137a4 100644 --- a/tests/models/test_trigger.py +++ b/tests/models/test_trigger.py @@ -31,7 +31,7 @@ from airflow.jobs.triggerer_job_runner import TriggererJobRunner from airflow.models import TaskInstance, Trigger, XCom from airflow.models.asset import AssetEvent, AssetModel, asset_trigger_association_table -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.serialization.serialized_objects import BaseSerialization from airflow.triggers.base import ( BaseTrigger, diff --git a/tests/models/test_xcom.py b/tests/models/test_xcom.py index 36fecea2314ce..ea0d95290f02a 100644 --- a/tests/models/test_xcom.py +++ b/tests/models/test_xcom.py @@ -28,7 +28,7 @@ from airflow.models.dagrun import DagRun, DagRunType from airflow.models.taskinstance import TaskInstance from airflow.models.xcom import BaseXCom, XCom, resolve_xcom_backend -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.settings import json from airflow.utils import timezone from airflow.utils.session import create_session diff --git a/tests/models/test_xcom_arg_map.py b/tests/models/test_xcom_arg_map.py index a654ef1dd4a2e..6d1ea09f3b217 100644 --- a/tests/models/test_xcom_arg_map.py +++ b/tests/models/test_xcom_arg_map.py @@ -22,7 +22,7 @@ from airflow.exceptions import AirflowSkipException from airflow.models.taskinstance import TaskInstance from airflow.models.taskmap import TaskMap, TaskMapVariant -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.state import TaskInstanceState from airflow.utils.trigger_rule import TriggerRule diff --git a/tests/notifications/test_basenotifier.py b/tests/notifications/test_basenotifier.py index 311272dd55219..554fe4b508e79 100644 --- a/tests/notifications/test_basenotifier.py +++ b/tests/notifications/test_basenotifier.py @@ -24,7 +24,7 @@ import pytest from airflow.notifications.basenotifier import BaseNotifier -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator pytestmark = pytest.mark.db_test diff --git a/tests/operators/test_branch_operator.py b/tests/operators/test_branch_operator.py index 2c9191c2b4bc4..d839bfb7532fa 100644 --- a/tests/operators/test_branch_operator.py +++ b/tests/operators/test_branch_operator.py @@ -23,7 +23,7 @@ from airflow.models.taskinstance import TaskInstance as TI from airflow.operators.branch import BaseBranchOperator -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.state import State from airflow.utils.task_group import TaskGroup diff --git a/tests/operators/test_trigger_dagrun.py b/tests/operators/test_trigger_dagrun.py index d4ff1796a3442..db86eb0fa7de9 100644 --- a/tests/operators/test_trigger_dagrun.py +++ b/tests/operators/test_trigger_dagrun.py @@ -46,7 +46,7 @@ DAG_SCRIPT = f"""\ from datetime import datetime from airflow.models import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator dag = DAG( dag_id='{TRIGGERED_DAG_ID}', diff --git a/tests/sensors/test_base.py b/tests/sensors/test_base.py index 8d19b3c5615fe..970960d7f1b2f 100644 --- a/tests/sensors/test_base.py +++ b/tests/sensors/test_base.py @@ -47,11 +47,11 @@ from airflow.models import TaskInstance, TaskReschedule from airflow.models.trigger import TriggerFailureReason from airflow.models.xcom import XCom -from airflow.operators.empty import EmptyOperator from airflow.providers.celery.executors.celery_executor import CeleryExecutor from airflow.providers.celery.executors.celery_kubernetes_executor import CeleryKubernetesExecutor from airflow.providers.cncf.kubernetes.executors.kubernetes_executor import KubernetesExecutor from airflow.providers.cncf.kubernetes.executors.local_kubernetes_executor import LocalKubernetesExecutor +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sensors.base import BaseSensorOperator, PokeReturnValue, poke_mode_only from airflow.ti_deps.deps.ready_to_reschedule import ReadyToRescheduleDep from airflow.utils import timezone diff --git a/tests/sensors/test_external_task_sensor.py b/tests/sensors/test_external_task_sensor.py index fc1b8a1315da2..d6bf001c5bd76 100644 --- a/tests/sensors/test_external_task_sensor.py +++ b/tests/sensors/test_external_task_sensor.py @@ -35,8 +35,8 @@ from airflow.models.dag import DAG from airflow.models.serialized_dag import SerializedDagModel from airflow.models.xcom_arg import XComArg -from airflow.operators.empty import EmptyOperator from airflow.providers.standard.operators.bash import BashOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.providers.standard.sensors.external_task import ( ExternalTaskMarker, diff --git a/tests/serialization/test_dag_serialization.py b/tests/serialization/test_dag_serialization.py index 2cd1ce14a5073..afb1feac97a09 100644 --- a/tests/serialization/test_dag_serialization.py +++ b/tests/serialization/test_dag_serialization.py @@ -64,7 +64,6 @@ from airflow.models.expandinput import EXPAND_INPUT_EMPTY from airflow.models.mappedoperator import MappedOperator from airflow.models.xcom import XCom -from airflow.operators.empty import EmptyOperator from airflow.providers.cncf.kubernetes.pod_generator import PodGenerator from airflow.providers.standard.operators.bash import BashOperator from airflow.providers.standard.sensors.bash import BashSensor @@ -1456,7 +1455,7 @@ def test_task_resources(self): """ Test task resources serialization/deserialization. """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator logical_date = datetime(2020, 1, 1) task_id = "task1" @@ -1474,6 +1473,7 @@ def test_task_group_serialization(self): """ Test TaskGroup serialization/deserialization. """ + from airflow.providers.standard.operators.empty import EmptyOperator logical_date = datetime(2020, 1, 1) with DAG("test_task_group_serialization", schedule=None, start_date=logical_date) as dag: @@ -1530,6 +1530,7 @@ def test_setup_teardown_tasks(self): """ Test setup and teardown task serialization/deserialization. """ + from airflow.providers.standard.operators.empty import EmptyOperator logical_date = datetime(2020, 1, 1) with DAG( @@ -1663,7 +1664,7 @@ def test_derived_dag_deps_sensor(self, mapped): """ Tests DAG dependency detection for sensors, including derived classes """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.sensors.external_task import ExternalTaskSensor class DerivedSensor(ExternalTaskSensor): @@ -1863,7 +1864,7 @@ def test_derived_dag_deps_operator(self, mapped): """ Tests DAG dependency detection for operators, including derived classes """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.trigger_dagrun import ( TriggerDagRunOperator, ) @@ -1905,7 +1906,7 @@ def test_task_group_sorted(self): """ Tests serialize_task_group, make sure the list is in order """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.serialization.serialized_objects import TaskGroupSerialization """ @@ -1979,7 +1980,7 @@ def test_edge_info_serialization(self): """ Tests edge_info serialization/deserialization. """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.edgemodifier import Label with DAG( @@ -2663,7 +2664,7 @@ def test_task_resources_serde(): """ Test task resources serialization/deserialization. """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator logical_date = datetime(2020, 1, 1) task_id = "task1" diff --git a/tests/serialization/test_serialized_objects.py b/tests/serialization/test_serialized_objects.py index b07ebece4f3ff..945a52e9f4f59 100644 --- a/tests/serialization/test_serialized_objects.py +++ b/tests/serialization/test_serialized_objects.py @@ -39,7 +39,7 @@ from airflow.models.dagrun import DagRun from airflow.models.taskinstance import SimpleTaskInstance, TaskInstance from airflow.models.xcom_arg import XComArg -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.providers.standard.triggers.file import FileTrigger from airflow.sdk.definitions.asset import Asset, AssetAlias, AssetAliasEvent, AssetUniqueKey, AssetWatcher diff --git a/tests/system/core/example_external_task_parent_deferrable.py b/tests/system/core/example_external_task_parent_deferrable.py index ff003eee12a48..090522fe92413 100644 --- a/tests/system/core/example_external_task_parent_deferrable.py +++ b/tests/system/core/example_external_task_parent_deferrable.py @@ -17,7 +17,7 @@ from __future__ import annotations from airflow import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.trigger_dagrun import TriggerDagRunOperator from airflow.providers.standard.sensors.external_task import ExternalTaskSensor from airflow.utils.timezone import datetime diff --git a/tests/system/example_empty.py b/tests/system/example_empty.py index d2d362012c633..ca81ea08d0be5 100644 --- a/tests/system/example_empty.py +++ b/tests/system/example_empty.py @@ -20,7 +20,7 @@ from airflow.models.baseoperator import chain from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator DAG_ID = "example_empty" diff --git a/tests/ti_deps/deps/test_mapped_task_upstream_dep.py b/tests/ti_deps/deps/test_mapped_task_upstream_dep.py index e91ce905a129a..3f1abdc3136ca 100644 --- a/tests/ti_deps/deps/test_mapped_task_upstream_dep.py +++ b/tests/ti_deps/deps/test_mapped_task_upstream_dep.py @@ -22,7 +22,7 @@ import pytest from airflow.exceptions import AirflowFailException, AirflowSkipException -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.ti_deps.dep_context import DepContext from airflow.ti_deps.deps.base_ti_dep import TIDepStatus from airflow.ti_deps.deps.mapped_task_upstream_dep import MappedTaskUpstreamDep diff --git a/tests/ti_deps/deps/test_not_previously_skipped_dep.py b/tests/ti_deps/deps/test_not_previously_skipped_dep.py index 377d216030aab..d22dc6f1a5825 100644 --- a/tests/ti_deps/deps/test_not_previously_skipped_dep.py +++ b/tests/ti_deps/deps/test_not_previously_skipped_dep.py @@ -21,7 +21,7 @@ import pytest from airflow.models import DagRun, TaskInstance -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import BranchPythonOperator from airflow.ti_deps.dep_context import DepContext from airflow.ti_deps.deps.not_previously_skipped_dep import NotPreviouslySkippedDep diff --git a/tests/ti_deps/deps/test_trigger_rule_dep.py b/tests/ti_deps/deps/test_trigger_rule_dep.py index 36b04d1f36daf..46a5b22574f12 100644 --- a/tests/ti_deps/deps/test_trigger_rule_dep.py +++ b/tests/ti_deps/deps/test_trigger_rule_dep.py @@ -28,7 +28,7 @@ from airflow.decorators import task, task_group from airflow.models.baseoperator import BaseOperator from airflow.models.taskinstance import TaskInstance -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.ti_deps.dep_context import DepContext from airflow.ti_deps.deps.trigger_rule_dep import TriggerRuleDep, _UpstreamTIStates from airflow.utils.state import DagRunState, TaskInstanceState diff --git a/tests/timetables/test_assets_timetable.py b/tests/timetables/test_assets_timetable.py index 1dc8e6428d927..541ef2abb6ea6 100644 --- a/tests/timetables/test_assets_timetable.py +++ b/tests/timetables/test_assets_timetable.py @@ -27,7 +27,7 @@ from airflow.models.asset import AssetDagRunQueue, AssetEvent, AssetModel from airflow.models.serialized_dag import SerializedDAG, SerializedDagModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset, AssetAll, AssetAny from airflow.timetables.assets import AssetOrTimeSchedule from airflow.timetables.base import DagRunInfo, DataInterval, TimeRestriction, Timetable diff --git a/tests/utils/test_dag_cycle.py b/tests/utils/test_dag_cycle.py index 55937f1382e38..0b3176c6ed886 100644 --- a/tests/utils/test_dag_cycle.py +++ b/tests/utils/test_dag_cycle.py @@ -20,7 +20,7 @@ from airflow.exceptions import AirflowDagCycleException from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.dag_cycle_tester import check_cycle from airflow.utils.edgemodifier import Label from airflow.utils.task_group import TaskGroup diff --git a/tests/utils/test_dot_renderer.py b/tests/utils/test_dot_renderer.py index 17cdca97a627f..71fabf30c4e4f 100644 --- a/tests/utils/test_dot_renderer.py +++ b/tests/utils/test_dot_renderer.py @@ -23,7 +23,7 @@ import pytest from airflow.models.dag import DAG -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.serialization.dag_dependency import DagDependency from airflow.utils import dot_renderer, timezone from airflow.utils.state import State diff --git a/tests/utils/test_edgemodifier.py b/tests/utils/test_edgemodifier.py index 41c08f4c2d601..37e599a9742ba 100644 --- a/tests/utils/test_edgemodifier.py +++ b/tests/utils/test_edgemodifier.py @@ -22,7 +22,7 @@ from airflow.models.dag import DAG from airflow.models.xcom_arg import XComArg -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import PythonOperator from airflow.utils.edgemodifier import Label from airflow.utils.task_group import TaskGroup diff --git a/tests/utils/test_task_group.py b/tests/utils/test_task_group.py index 4d73349d08314..b6643348a4eb5 100644 --- a/tests/utils/test_task_group.py +++ b/tests/utils/test_task_group.py @@ -33,7 +33,7 @@ from airflow.models.baseoperator import BaseOperator from airflow.models.dag import DAG from airflow.models.xcom_arg import XComArg -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.dag_edges import dag_edges from airflow.utils.task_group import TaskGroup, task_group_to_dict, task_group_to_dict_legacy @@ -653,7 +653,7 @@ def test_dag_edges_setup_teardown(): def test_dag_edges_setup_teardown_nested(): from airflow.decorators import task, task_group from airflow.models.dag import DAG - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator logical_date = pendulum.parse("20200101") diff --git a/tests/utils/test_task_handler_with_custom_formatter.py b/tests/utils/test_task_handler_with_custom_formatter.py index 8d2856927af00..118e442d0c15a 100644 --- a/tests/utils/test_task_handler_with_custom_formatter.py +++ b/tests/utils/test_task_handler_with_custom_formatter.py @@ -23,7 +23,7 @@ from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.models.taskinstance import TaskInstance -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.log.logging_mixin import set_context from airflow.utils.state import DagRunState from airflow.utils.timezone import datetime diff --git a/tests/www/views/test_views.py b/tests/www/views/test_views.py index 6ac7039cebd8c..0be57b523f96c 100644 --- a/tests/www/views/test_views.py +++ b/tests/www/views/test_views.py @@ -316,7 +316,7 @@ def test_mark_task_instance_state(test_app, dag_maker): """ from airflow.models.dagbag import DagBag from airflow.models.taskinstance import TaskInstance - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.timezone import datetime @@ -401,7 +401,7 @@ def test_mark_task_group_state(test_app, dag_maker): """ from airflow.models.dagbag import DagBag from airflow.models.taskinstance import TaskInstance - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.timezone import datetime diff --git a/tests/www/views/test_views_asset.py b/tests/www/views/test_views_asset.py index 2e6668f134ad3..a5d61b0f5edba 100644 --- a/tests/www/views/test_views_asset.py +++ b/tests/www/views/test_views_asset.py @@ -23,7 +23,7 @@ from dateutil.tz import UTC from airflow.models.asset import AssetActive, AssetEvent, AssetModel -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from tests_common.test_utils.asserts import assert_queries_count diff --git a/tests/www/views/test_views_cluster_activity.py b/tests/www/views/test_views_cluster_activity.py index 403632f3e4dfe..084f73108364d 100644 --- a/tests/www/views/test_views_cluster_activity.py +++ b/tests/www/views/test_views_cluster_activity.py @@ -23,7 +23,7 @@ import pytest from airflow.models import DagBag -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunType diff --git a/tests/www/views/test_views_grid.py b/tests/www/views/test_views_grid.py index 475c9ee63ffa1..61887b0bdf249 100644 --- a/tests/www/views/test_views_grid.py +++ b/tests/www/views/test_views_grid.py @@ -27,8 +27,8 @@ from airflow.decorators import task_group from airflow.models import DagBag from airflow.models.asset import AssetDagRunQueue, AssetEvent, AssetModel -from airflow.operators.empty import EmptyOperator from airflow.providers.common.compat.lineage.entities import File +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.asset import Asset from airflow.utils import timezone from airflow.utils.state import DagRunState, TaskInstanceState diff --git a/tests/www/views/test_views_tasks.py b/tests/www/views/test_views_tasks.py index 31af5e5ac3063..a4d6ef6afc23b 100644 --- a/tests/www/views/test_views_tasks.py +++ b/tests/www/views/test_views_tasks.py @@ -32,8 +32,8 @@ from airflow.models.taskinstance import TaskInstance from airflow.models.taskreschedule import TaskReschedule from airflow.models.xcom import XCom -from airflow.operators.empty import EmptyOperator from airflow.providers.celery.executors.celery_executor import CeleryExecutor +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.security import permissions from airflow.utils import timezone from airflow.utils.log.logging_mixin import ExternalLoggingMixin diff --git a/tests/www/views/test_views_trigger_dag.py b/tests/www/views/test_views_trigger_dag.py index bcd80ed555bbe..1300918c6fb41 100644 --- a/tests/www/views/test_views_trigger_dag.py +++ b/tests/www/views/test_views_trigger_dag.py @@ -25,7 +25,7 @@ import pytest from airflow.models import DagBag, DagRun -from airflow.operators.empty import EmptyOperator +from airflow.providers.standard.operators.empty import EmptyOperator from airflow.sdk.definitions.param import Param from airflow.security import permissions from airflow.utils import timezone diff --git a/tests_common/pytest_plugin.py b/tests_common/pytest_plugin.py index f777b3d6af8af..28da87def3c9f 100644 --- a/tests_common/pytest_plugin.py +++ b/tests_common/pytest_plugin.py @@ -40,7 +40,7 @@ from airflow.models.dag import DAG, ScheduleArg from airflow.models.dagrun import DagRun, DagRunType from airflow.models.taskinstance import TaskInstance - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.timetables.base import DataInterval from airflow.typing_compat import Self from airflow.utils.state import DagRunState, TaskInstanceState @@ -1125,7 +1125,7 @@ def create_dummy_dag(dag_maker: DagMaker) -> CreateDummyDAG: You cannot be able to alter the created DagRun or DagModel, use `dag_maker` fixture instead. """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator from airflow.utils.types import DagRunType def create_dag( @@ -1207,7 +1207,7 @@ def create_task_instance(dag_maker: DagMaker, create_dummy_dag: CreateDummyDAG) Uses ``create_dummy_dag`` to create the dag structure. """ - from airflow.operators.empty import EmptyOperator + from airflow.providers.standard.operators.empty import EmptyOperator def maker( logical_date=None,