You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/05 09:56:30 UTC
[airflow] branch master updated: Replace deprecated module and
operator in example_tasks.py (#13473)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 7d1ea4c Replace deprecated module and operator in example_tasks.py (#13473)
7d1ea4c is described below
commit 7d1ea4cb102e7d9878eeeaab5b098ae7767b844b
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Tue Jan 5 09:56:18 2021 +0000
Replace deprecated module and operator in example_tasks.py (#13473)
- `from airflow.operators.bash_operator import BashOperator` to `from airflow.operators.bash import BashOperator`
- `from airflow.utils.helpers import chain` to `from airflow.models.baseoperator import chain`
---
airflow/providers/google/cloud/example_dags/example_tasks.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/providers/google/cloud/example_dags/example_tasks.py b/airflow/providers/google/cloud/example_dags/example_tasks.py
index c6a50a5..82335de 100644
--- a/airflow/providers/google/cloud/example_dags/example_tasks.py
+++ b/airflow/providers/google/cloud/example_dags/example_tasks.py
@@ -29,7 +29,8 @@ from google.cloud.tasks_v2.types import Queue
from google.protobuf import timestamp_pb2
from airflow import models
-from airflow.operators.bash_operator import BashOperator
+from airflow.models.baseoperator import chain
+from airflow.operators.bash import BashOperator
from airflow.providers.google.cloud.operators.tasks import (
CloudTasksQueueCreateOperator,
CloudTasksQueueDeleteOperator,
@@ -46,7 +47,6 @@ from airflow.providers.google.cloud.operators.tasks import (
CloudTasksTasksListOperator,
)
from airflow.utils.dates import days_ago
-from airflow.utils.helpers import chain
timestamp = timestamp_pb2.Timestamp()
timestamp.FromDatetime(datetime.now() + timedelta(hours=12)) # pylint: disable=no-member