nuclearpinguin commented on a change in pull request #7506: [AIRFLOW-6877]
[WIP] check cross providers dependencies depends on [AIRFLOW-6663]
URL: https://github.com/apache/airflow/pull/7506#discussion_r382935743
##########
File path: airflow/providers/google/cloud/operators/sftp_to_gcs.py
##########
@@ -19,15 +19,23 @@
This module contains SFTP to Google Cloud Storage operator.
"""
import os
+import warnings
from tempfile import NamedTemporaryFile
from typing import Optional, Union
from airflow.exceptions import AirflowException
from airflow.models import BaseOperator
-from airflow.providers.google.cloud.hooks.gcs import GCSHook
-from airflow.providers.sftp.hooks.sftp import SFTPHook
from airflow.utils.decorators import apply_defaults
+try:
+ from airflow.providers.google.cloud.hooks.gcs import GCSHook
+except ImportError:
+ warnings.warn("The package providers-google-cloud must be installed to use
the operator.",
Review comment:
Should it be `providers-ssh` instead of gcp?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services