This is an automated email from the ASF dual-hosted git repository.

rom pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 4c2c4079d6 remove time folder from standard provider (#42392)
4c2c4079d6 is described below

commit 4c2c4079d6750367d7ef2bab45d788e8ced3d1e6
Author: GPK <[email protected]>
AuthorDate: Sat Sep 21 17:17:08 2024 +0100

    remove time folder from standard provider (#42392)
---
 airflow/example_dags/example_branch_datetime_operator.py |  2 +-
 .../example_dags/example_branch_day_of_week_operator.py  |  2 +-
 airflow/example_dags/example_sensors.py                  |  6 +++---
 airflow/example_dags/example_time_delta_sensor_async.py  |  2 +-
 .../providers/standard/{time => operators}/__init__.py   |  0
 .../providers/standard/{time => }/operators/datetime.py  |  0
 .../providers/standard/{time => }/operators/weekday.py   |  0
 airflow/providers/standard/provider.yaml                 | 12 ++++++------
 .../standard/{time/operators => sensors}/__init__.py     |  0
 .../providers/standard/{time => }/sensors/date_time.py   |  0
 airflow/providers/standard/{time => }/sensors/time.py    |  0
 .../providers/standard/{time => }/sensors/time_delta.py  |  0
 airflow/providers/standard/{time => }/sensors/weekday.py |  0
 tests/dags/test_sensor.py                                |  2 +-
 .../providers/standard/operators}/__init__.py            |  0
 .../standard/{time => }/operators/test_datetime.py       |  2 +-
 .../standard/{time => }/operators/test_weekday.py        |  2 +-
 tests/providers/standard/{time => sensors}/__init__.py   |  0
 .../standard/{time => }/sensors/test_date_time.py        |  4 ++--
 tests/providers/standard/{time => }/sensors/test_time.py |  2 +-
 .../standard/{time => }/sensors/test_time_delta.py       |  4 ++--
 .../standard/{time => }/sensors/test_weekday.py          |  2 +-
 tests/providers/standard/time/operators/__init__.py      | 16 ----------------
 tests/providers/standard/time/sensors/__init__.py        | 16 ----------------
 tests/sensors/test_external_task_sensor.py               |  2 +-
 25 files changed, 22 insertions(+), 54 deletions(-)

diff --git a/airflow/example_dags/example_branch_datetime_operator.py 
b/airflow/example_dags/example_branch_datetime_operator.py
index e5aaa592cd..99645b9c9e 100644
--- a/airflow/example_dags/example_branch_datetime_operator.py
+++ b/airflow/example_dags/example_branch_datetime_operator.py
@@ -26,7 +26,7 @@ import pendulum
 
 from airflow.models.dag import DAG
 from airflow.operators.empty import EmptyOperator
-from airflow.providers.standard.time.operators.datetime import 
BranchDateTimeOperator
+from airflow.providers.standard.operators.datetime import 
BranchDateTimeOperator
 
 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 ef7caf9cdc..b7eed08acd 100644
--- a/airflow/example_dags/example_branch_day_of_week_operator.py
+++ b/airflow/example_dags/example_branch_day_of_week_operator.py
@@ -25,7 +25,7 @@ import pendulum
 
 from airflow.models.dag import DAG
 from airflow.operators.empty import EmptyOperator
-from airflow.providers.standard.time.operators.weekday import 
BranchDayOfWeekOperator
+from airflow.providers.standard.operators.weekday import 
BranchDayOfWeekOperator
 from airflow.utils.weekday import WeekDay
 
 with DAG(
diff --git a/airflow/example_dags/example_sensors.py 
b/airflow/example_dags/example_sensors.py
index 9889695ab3..6fb564e63a 100644
--- a/airflow/example_dags/example_sensors.py
+++ b/airflow/example_dags/example_sensors.py
@@ -23,9 +23,9 @@ import pendulum
 
 from airflow.models.dag import DAG
 from airflow.operators.bash import BashOperator
-from airflow.providers.standard.time.sensors.time import TimeSensor, 
TimeSensorAsync
-from airflow.providers.standard.time.sensors.time_delta import 
TimeDeltaSensor, TimeDeltaSensorAsync
-from airflow.providers.standard.time.sensors.weekday import DayOfWeekSensor
+from airflow.providers.standard.sensors.time import TimeSensor, TimeSensorAsync
+from airflow.providers.standard.sensors.time_delta import TimeDeltaSensor, 
TimeDeltaSensorAsync
+from airflow.providers.standard.sensors.weekday import DayOfWeekSensor
 from airflow.sensors.bash import BashSensor
 from airflow.sensors.filesystem import FileSensor
 from airflow.sensors.python import PythonSensor
diff --git a/airflow/example_dags/example_time_delta_sensor_async.py 
b/airflow/example_dags/example_time_delta_sensor_async.py
index f8d43beb96..15a1e52690 100644
--- a/airflow/example_dags/example_time_delta_sensor_async.py
+++ b/airflow/example_dags/example_time_delta_sensor_async.py
@@ -28,7 +28,7 @@ import pendulum
 
 from airflow.models.dag import DAG
 from airflow.operators.empty import EmptyOperator
-from airflow.providers.standard.time.sensors.time_delta import 
TimeDeltaSensorAsync
+from airflow.providers.standard.sensors.time_delta import TimeDeltaSensorAsync
 
 with DAG(
     dag_id="example_time_delta_sensor_async",
diff --git a/airflow/providers/standard/time/__init__.py 
b/airflow/providers/standard/operators/__init__.py
similarity index 100%
rename from airflow/providers/standard/time/__init__.py
rename to airflow/providers/standard/operators/__init__.py
diff --git a/airflow/providers/standard/time/operators/datetime.py 
b/airflow/providers/standard/operators/datetime.py
similarity index 100%
rename from airflow/providers/standard/time/operators/datetime.py
rename to airflow/providers/standard/operators/datetime.py
diff --git a/airflow/providers/standard/time/operators/weekday.py 
b/airflow/providers/standard/operators/weekday.py
similarity index 100%
rename from airflow/providers/standard/time/operators/weekday.py
rename to airflow/providers/standard/operators/weekday.py
diff --git a/airflow/providers/standard/provider.yaml 
b/airflow/providers/standard/provider.yaml
index 3dc047d897..83d8acf0a6 100644
--- a/airflow/providers/standard/provider.yaml
+++ b/airflow/providers/standard/provider.yaml
@@ -40,13 +40,13 @@ integrations:
 operators:
   - integration-name: Standard
     python-modules:
-      - airflow.providers.standard.time.operators.datetime
-      - airflow.providers.standard.time.operators.weekday
+      - airflow.providers.standard.operators.datetime
+      - airflow.providers.standard.operators.weekday
 
 sensors:
   - integration-name: Standard
     python-modules:
-      - airflow.providers.standard.time.sensors.date_time
-      - airflow.providers.standard.time.sensors.time_delta
-      - airflow.providers.standard.time.sensors.time
-      - airflow.providers.standard.time.sensors.weekday
+      - airflow.providers.standard.sensors.date_time
+      - airflow.providers.standard.sensors.time_delta
+      - airflow.providers.standard.sensors.time
+      - airflow.providers.standard.sensors.weekday
diff --git a/airflow/providers/standard/time/operators/__init__.py 
b/airflow/providers/standard/sensors/__init__.py
similarity index 100%
rename from airflow/providers/standard/time/operators/__init__.py
rename to airflow/providers/standard/sensors/__init__.py
diff --git a/airflow/providers/standard/time/sensors/date_time.py 
b/airflow/providers/standard/sensors/date_time.py
similarity index 100%
rename from airflow/providers/standard/time/sensors/date_time.py
rename to airflow/providers/standard/sensors/date_time.py
diff --git a/airflow/providers/standard/time/sensors/time.py 
b/airflow/providers/standard/sensors/time.py
similarity index 100%
rename from airflow/providers/standard/time/sensors/time.py
rename to airflow/providers/standard/sensors/time.py
diff --git a/airflow/providers/standard/time/sensors/time_delta.py 
b/airflow/providers/standard/sensors/time_delta.py
similarity index 100%
rename from airflow/providers/standard/time/sensors/time_delta.py
rename to airflow/providers/standard/sensors/time_delta.py
diff --git a/airflow/providers/standard/time/sensors/weekday.py 
b/airflow/providers/standard/sensors/weekday.py
similarity index 100%
rename from airflow/providers/standard/time/sensors/weekday.py
rename to airflow/providers/standard/sensors/weekday.py
diff --git a/tests/dags/test_sensor.py b/tests/dags/test_sensor.py
index b922ab2e52..d023949e31 100644
--- a/tests/dags/test_sensor.py
+++ b/tests/dags/test_sensor.py
@@ -20,7 +20,7 @@ import datetime
 
 from airflow.decorators import task
 from airflow.models.dag import DAG
-from airflow.providers.standard.time.sensors.date_time import DateTimeSensor
+from airflow.providers.standard.sensors.date_time import DateTimeSensor
 from airflow.utils import timezone
 
 with DAG(
diff --git a/airflow/providers/standard/time/sensors/__init__.py 
b/tests/providers/standard/operators/__init__.py
similarity index 100%
rename from airflow/providers/standard/time/sensors/__init__.py
rename to tests/providers/standard/operators/__init__.py
diff --git a/tests/providers/standard/time/operators/test_datetime.py 
b/tests/providers/standard/operators/test_datetime.py
similarity index 99%
rename from tests/providers/standard/time/operators/test_datetime.py
rename to tests/providers/standard/operators/test_datetime.py
index 9250ae147b..530450a963 100644
--- a/tests/providers/standard/time/operators/test_datetime.py
+++ b/tests/providers/standard/operators/test_datetime.py
@@ -26,7 +26,7 @@ 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.time.operators.datetime import 
BranchDateTimeOperator
+from airflow.providers.standard.operators.datetime import 
BranchDateTimeOperator
 from airflow.utils import timezone
 from airflow.utils.session import create_session
 from airflow.utils.state import State
diff --git a/tests/providers/standard/time/operators/test_weekday.py 
b/tests/providers/standard/operators/test_weekday.py
similarity index 99%
rename from tests/providers/standard/time/operators/test_weekday.py
rename to tests/providers/standard/operators/test_weekday.py
index 338a6217ca..7ad7415c36 100644
--- a/tests/providers/standard/time/operators/test_weekday.py
+++ b/tests/providers/standard/operators/test_weekday.py
@@ -27,7 +27,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.time.operators.weekday import 
BranchDayOfWeekOperator
+from airflow.providers.standard.operators.weekday import 
BranchDayOfWeekOperator
 from airflow.utils import timezone
 from airflow.utils.session import create_session
 from airflow.utils.state import State
diff --git a/tests/providers/standard/time/__init__.py 
b/tests/providers/standard/sensors/__init__.py
similarity index 100%
rename from tests/providers/standard/time/__init__.py
rename to tests/providers/standard/sensors/__init__.py
diff --git a/tests/providers/standard/time/sensors/test_date_time.py 
b/tests/providers/standard/sensors/test_date_time.py
similarity index 95%
rename from tests/providers/standard/time/sensors/test_date_time.py
rename to tests/providers/standard/sensors/test_date_time.py
index 10ffe42f63..c51b531620 100644
--- a/tests/providers/standard/time/sensors/test_date_time.py
+++ b/tests/providers/standard/sensors/test_date_time.py
@@ -22,7 +22,7 @@ from unittest.mock import patch
 import pytest
 
 from airflow.models.dag import DAG
-from airflow.providers.standard.time.sensors.date_time import DateTimeSensor
+from airflow.providers.standard.sensors.date_time import DateTimeSensor
 from airflow.utils import timezone
 
 DEFAULT_DATE = timezone.datetime(2015, 1, 1)
@@ -84,7 +84,7 @@ class TestDateTimeSensor:
         ],
     )
     @patch(
-        "airflow.providers.standard.time.sensors.date_time.timezone.utcnow",
+        "airflow.providers.standard.sensors.date_time.timezone.utcnow",
         return_value=timezone.datetime(2020, 1, 1, 23, 0, tzinfo=timezone.utc),
     )
     def test_poke(self, mock_utcnow, task_id, target_time, expected):
diff --git a/tests/providers/standard/time/sensors/test_time.py 
b/tests/providers/standard/sensors/test_time.py
similarity index 97%
rename from tests/providers/standard/time/sensors/test_time.py
rename to tests/providers/standard/sensors/test_time.py
index 6ef183ff6c..a144c3dc41 100644
--- a/tests/providers/standard/time/sensors/test_time.py
+++ b/tests/providers/standard/sensors/test_time.py
@@ -25,7 +25,7 @@ import time_machine
 
 from airflow.exceptions import TaskDeferred
 from airflow.models.dag import DAG
-from airflow.providers.standard.time.sensors.time import TimeSensor, 
TimeSensorAsync
+from airflow.providers.standard.sensors.time import TimeSensor, TimeSensorAsync
 from airflow.triggers.temporal import DateTimeTrigger
 from airflow.utils import timezone
 
diff --git a/tests/providers/standard/time/sensors/test_time_delta.py 
b/tests/providers/standard/sensors/test_time_delta.py
similarity index 96%
rename from tests/providers/standard/time/sensors/test_time_delta.py
rename to tests/providers/standard/sensors/test_time_delta.py
index 4f2b202f1a..96368a42d4 100644
--- a/tests/providers/standard/time/sensors/test_time_delta.py
+++ b/tests/providers/standard/sensors/test_time_delta.py
@@ -26,7 +26,7 @@ import time_machine
 
 from airflow.models import DagBag
 from airflow.models.dag import DAG
-from airflow.providers.standard.time.sensors.time_delta import (
+from airflow.providers.standard.sensors.time_delta import (
     TimeDeltaSensor,
     TimeDeltaSensorAsync,
     WaitSensor,
@@ -81,7 +81,7 @@ class TestTimeDeltaSensorAsync:
         [False, True],
     )
     @mock.patch("airflow.models.baseoperator.BaseOperator.defer")
-    @mock.patch("airflow.providers.standard.time.sensors.time_delta.sleep")
+    @mock.patch("airflow.providers.standard.sensors.time_delta.sleep")
     def test_wait_sensor(self, sleep_mock, defer_mock, should_defer):
         wait_time = timedelta(seconds=30)
         op = WaitSensor(
diff --git a/tests/providers/standard/time/sensors/test_weekday.py 
b/tests/providers/standard/sensors/test_weekday.py
similarity index 98%
rename from tests/providers/standard/time/sensors/test_weekday.py
rename to tests/providers/standard/sensors/test_weekday.py
index 900c3d8692..d4a0f04c22 100644
--- a/tests/providers/standard/time/sensors/test_weekday.py
+++ b/tests/providers/standard/sensors/test_weekday.py
@@ -24,7 +24,7 @@ import pytest
 from airflow.exceptions import AirflowSensorTimeout
 from airflow.models import DagBag
 from airflow.models.dag import DAG
-from airflow.providers.standard.time.sensors.weekday import DayOfWeekSensor
+from airflow.providers.standard.sensors.weekday import DayOfWeekSensor
 from airflow.utils.timezone import datetime
 from airflow.utils.weekday import WeekDay
 from tests.test_utils import db
diff --git a/tests/providers/standard/time/operators/__init__.py 
b/tests/providers/standard/time/operators/__init__.py
deleted file mode 100644
index 13a83393a9..0000000000
--- a/tests/providers/standard/time/operators/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
diff --git a/tests/providers/standard/time/sensors/__init__.py 
b/tests/providers/standard/time/sensors/__init__.py
deleted file mode 100644
index 13a83393a9..0000000000
--- a/tests/providers/standard/time/sensors/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
diff --git a/tests/sensors/test_external_task_sensor.py 
b/tests/sensors/test_external_task_sensor.py
index f5e3843a11..3d6268834d 100644
--- a/tests/sensors/test_external_task_sensor.py
+++ b/tests/sensors/test_external_task_sensor.py
@@ -38,7 +38,7 @@ from airflow.models.xcom_arg import XComArg
 from airflow.operators.bash import BashOperator
 from airflow.operators.empty import EmptyOperator
 from airflow.operators.python import PythonOperator
-from airflow.providers.standard.time.sensors.time import TimeSensor
+from airflow.providers.standard.sensors.time import TimeSensor
 from airflow.sensors.external_task import (
     ExternalTaskMarker,
     ExternalTaskSensor,

Reply via email to