From bcfeb47b2f414a3fc042c3f7ca6b30103b24398a Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 4 Sep 2022 17:27:05 +0200 Subject: [PATCH] Removed deprecated contrib files and replace them with PEP-562 getattr The conrib modules are carried from Airflow 1.10 and we cannot remove the classes that were used there without bumping Airlfow to 3, however we can replace the files with dynamic attribute retrieval following PEP-562. This way we will have far less number of files in contrib and users will not get auto-import and autocomplete when they will be developing their DAGs. This does not break compatibility but it providers much stronger signal to the users that they should switch to new classes: * they will not see the classes in autocomplete and autoimport any more * it will seem that the classes are not existing in contrib until they are used * if anyone performs static analysis on the DAGs, the analysis will fail (and this is an intended behaviour) --- .pre-commit-config.yaml | 2 +- airflow/contrib/hooks/__init__.py | 284 +++- airflow/contrib/hooks/aws_athena_hook.py | 29 - airflow/contrib/hooks/aws_datasync_hook.py | 29 - airflow/contrib/hooks/aws_dynamodb_hook.py | 28 - airflow/contrib/hooks/aws_firehose_hook.py | 29 - .../contrib/hooks/aws_glue_catalog_hook.py | 28 - airflow/contrib/hooks/aws_hook.py | 43 - airflow/contrib/hooks/aws_lambda_hook.py | 32 - airflow/contrib/hooks/aws_logs_hook.py | 28 - airflow/contrib/hooks/aws_sns_hook.py | 29 - airflow/contrib/hooks/aws_sqs_hook.py | 44 - .../hooks/azure_container_instance_hook.py | 28 - .../hooks/azure_container_registry_hook.py | 28 - .../hooks/azure_container_volume_hook.py | 31 - airflow/contrib/hooks/azure_cosmos_hook.py | 28 - airflow/contrib/hooks/azure_data_lake_hook.py | 28 - airflow/contrib/hooks/azure_fileshare_hook.py | 28 - airflow/contrib/hooks/bigquery_hook.py | 34 - airflow/contrib/hooks/cassandra_hook.py | 28 - airflow/contrib/hooks/cloudant_hook.py | 28 - airflow/contrib/hooks/databricks_hook.py | 39 - airflow/contrib/hooks/datadog_hook.py | 28 - airflow/contrib/hooks/datastore_hook.py | 28 - airflow/contrib/hooks/dingding_hook.py | 28 - airflow/contrib/hooks/discord_webhook_hook.py | 28 - airflow/contrib/hooks/emr_hook.py | 28 - airflow/contrib/hooks/fs_hook.py | 26 - airflow/contrib/hooks/ftp_hook.py | 28 - airflow/contrib/hooks/gcp_api_base_hook.py | 43 - airflow/contrib/hooks/gcp_bigtable_hook.py | 28 - airflow/contrib/hooks/gcp_cloud_build_hook.py | 28 - airflow/contrib/hooks/gcp_compute_hook.py | 44 - airflow/contrib/hooks/gcp_container_hook.py | 43 - airflow/contrib/hooks/gcp_dataflow_hook.py | 44 - airflow/contrib/hooks/gcp_dataproc_hook.py | 45 - airflow/contrib/hooks/gcp_dlp_hook.py | 28 - airflow/contrib/hooks/gcp_function_hook.py | 45 - airflow/contrib/hooks/gcp_kms_hook.py | 40 - airflow/contrib/hooks/gcp_mlengine_hook.py | 28 - .../hooks/gcp_natural_language_hook.py | 28 - airflow/contrib/hooks/gcp_pubsub_hook.py | 28 - airflow/contrib/hooks/gcp_spanner_hook.py | 36 - .../contrib/hooks/gcp_speech_to_text_hook.py | 45 - airflow/contrib/hooks/gcp_sql_hook.py | 47 - airflow/contrib/hooks/gcp_tasks_hook.py | 28 - .../contrib/hooks/gcp_text_to_speech_hook.py | 45 - airflow/contrib/hooks/gcp_transfer_hook.py | 50 - airflow/contrib/hooks/gcp_translate_hook.py | 28 - .../hooks/gcp_video_intelligence_hook.py | 28 - airflow/contrib/hooks/gcp_vision_hook.py | 28 - airflow/contrib/hooks/gcs_hook.py | 39 - airflow/contrib/hooks/gdrive_hook.py | 28 - airflow/contrib/hooks/grpc_hook.py | 28 - airflow/contrib/hooks/imap_hook.py | 28 - airflow/contrib/hooks/jenkins_hook.py | 28 - airflow/contrib/hooks/jira_hook.py | 29 - airflow/contrib/hooks/mongo_hook.py | 28 - airflow/contrib/hooks/openfaas_hook.py | 28 - airflow/contrib/hooks/opsgenie_alert_hook.py | 28 - airflow/contrib/hooks/pagerduty_hook.py | 28 - airflow/contrib/hooks/pinot_hook.py | 28 - airflow/contrib/hooks/qubole_check_hook.py | 28 - airflow/contrib/hooks/qubole_hook.py | 28 - airflow/contrib/hooks/redis_hook.py | 28 - airflow/contrib/hooks/redshift_hook.py | 31 - airflow/contrib/hooks/sagemaker_hook.py | 35 - airflow/contrib/hooks/salesforce_hook.py | 28 - airflow/contrib/hooks/segment_hook.py | 28 - airflow/contrib/hooks/sftp_hook.py | 28 - airflow/contrib/hooks/slack_webhook_hook.py | 28 - airflow/contrib/hooks/snowflake_hook.py | 29 - airflow/contrib/hooks/spark_jdbc_hook.py | 28 - airflow/contrib/hooks/spark_sql_hook.py | 28 - airflow/contrib/hooks/spark_submit_hook.py | 28 - airflow/contrib/hooks/sqoop_hook.py | 28 - airflow/contrib/hooks/ssh_hook.py | 28 - airflow/contrib/hooks/vertica_hook.py | 28 - airflow/contrib/hooks/wasb_hook.py | 28 - airflow/contrib/hooks/winrm_hook.py | 28 - airflow/contrib/operators/__init__.py | 627 +++++++ .../contrib/operators/adls_list_operator.py | 44 - airflow/contrib/operators/adls_to_gcs.py | 44 - .../contrib/operators/aws_athena_operator.py | 29 - .../operators/aws_sqs_publish_operator.py | 44 - .../contrib/operators/awsbatch_operator.py | 56 - .../azure_container_instances_operator.py | 33 - .../operators/azure_cosmos_operator.py | 28 - .../operators/bigquery_check_operator.py | 32 - .../contrib/operators/bigquery_get_data.py | 28 - .../contrib/operators/bigquery_operator.py | 55 - .../bigquery_table_delete_operator.py | 44 - .../contrib/operators/bigquery_to_bigquery.py | 31 - airflow/contrib/operators/bigquery_to_gcs.py | 44 - .../operators/bigquery_to_mysql_operator.py | 30 - airflow/contrib/operators/cassandra_to_gcs.py | 47 - .../contrib/operators/databricks_operator.py | 31 - .../contrib/operators/dataflow_operator.py | 82 - .../contrib/operators/dataproc_operator.py | 244 --- .../operators/datastore_export_operator.py | 45 - .../operators/datastore_import_operator.py | 45 - .../contrib/operators/dingding_operator.py | 28 - .../operators/discord_webhook_operator.py | 28 - .../operators/docker_swarm_operator.py | 28 - airflow/contrib/operators/druid_operator.py | 28 - airflow/contrib/operators/dynamodb_to_s3.py | 28 - airflow/contrib/operators/ecs_operator.py | 47 - .../operators/emr_add_steps_operator.py | 33 - .../operators/emr_create_job_flow_operator.py | 34 - .../emr_terminate_job_flow_operator.py | 36 - airflow/contrib/operators/file_to_gcs.py | 45 - airflow/contrib/operators/file_to_wasb.py | 45 - .../operators/gcp_bigtable_operator.py | 136 -- .../operators/gcp_cloud_build_operator.py | 28 - .../contrib/operators/gcp_compute_operator.py | 138 -- .../operators/gcp_container_operator.py | 83 - airflow/contrib/operators/gcp_dlp_operator.py | 123 -- .../operators/gcp_function_operator.py | 65 - .../gcp_natural_language_operator.py | 114 -- .../contrib/operators/gcp_spanner_operator.py | 125 -- .../operators/gcp_speech_to_text_operator.py | 47 - airflow/contrib/operators/gcp_sql_operator.py | 149 -- .../contrib/operators/gcp_tasks_operator.py | 42 - .../operators/gcp_text_to_speech_operator.py | 45 - .../operators/gcp_transfer_operator.py | 229 --- .../operators/gcp_translate_operator.py | 28 - .../gcp_translate_speech_operator.py | 49 - .../gcp_video_intelligence_operator.py | 35 - .../contrib/operators/gcp_vision_operator.py | 227 --- airflow/contrib/operators/gcs_acl_operator.py | 63 - .../contrib/operators/gcs_delete_operator.py | 44 - .../operators/gcs_download_operator.py | 44 - .../contrib/operators/gcs_list_operator.py | 44 - airflow/contrib/operators/gcs_operator.py | 44 - airflow/contrib/operators/gcs_to_bq.py | 44 - airflow/contrib/operators/gcs_to_gcs.py | 44 - .../operators/gcs_to_gcs_transfer_operator.py | 30 - .../operators/gcs_to_gdrive_operator.py | 28 - airflow/contrib/operators/gcs_to_s3.py | 44 - airflow/contrib/operators/grpc_operator.py | 28 - airflow/contrib/operators/hive_to_dynamodb.py | 28 - .../imap_attachment_to_s3_operator.py | 31 - .../operators/jenkins_job_trigger_operator.py | 28 - airflow/contrib/operators/jira_operator.py | 28 - .../operators/kubernetes_pod_operator.py | 31 - .../contrib/operators/mlengine_operator.py | 100 -- airflow/contrib/operators/mongo_to_s3.py | 28 - airflow/contrib/operators/mssql_to_gcs.py | 44 - airflow/contrib/operators/mysql_to_gcs.py | 44 - .../operators/opsgenie_alert_operator.py | 44 - .../oracle_to_azure_data_lake_transfer.py | 34 - .../operators/oracle_to_oracle_transfer.py | 49 - .../operators/postgres_to_gcs_operator.py | 44 - airflow/contrib/operators/pubsub_operator.py | 118 -- .../operators/qubole_check_operator.py | 31 - airflow/contrib/operators/qubole_operator.py | 28 - .../operators/redis_publish_operator.py | 28 - .../operators/s3_copy_object_operator.py | 33 - .../operators/s3_delete_objects_operator.py | 36 - airflow/contrib/operators/s3_list_operator.py | 33 - .../contrib/operators/s3_to_gcs_operator.py | 28 - .../operators/s3_to_gcs_transfer_operator.py | 33 - .../contrib/operators/s3_to_sftp_operator.py | 28 - .../operators/sagemaker_base_operator.py | 33 - .../sagemaker_endpoint_config_operator.py | 36 - .../operators/sagemaker_endpoint_operator.py | 36 - .../operators/sagemaker_model_operator.py | 33 - .../operators/sagemaker_training_operator.py | 33 - .../operators/sagemaker_transform_operator.py | 33 - .../operators/sagemaker_tuning_operator.py | 33 - .../operators/segment_track_event_operator.py | 28 - airflow/contrib/operators/sftp_operator.py | 28 - .../contrib/operators/sftp_to_s3_operator.py | 28 - .../operators/slack_webhook_operator.py | 28 - .../contrib/operators/snowflake_operator.py | 28 - .../contrib/operators/sns_publish_operator.py | 29 - .../contrib/operators/spark_jdbc_operator.py | 28 - .../contrib/operators/spark_sql_operator.py | 28 - .../operators/spark_submit_operator.py | 28 - airflow/contrib/operators/sql_to_gcs.py | 44 - airflow/contrib/operators/sqoop_operator.py | 28 - airflow/contrib/operators/ssh_operator.py | 28 - airflow/contrib/operators/vertica_operator.py | 28 - airflow/contrib/operators/vertica_to_hive.py | 49 - airflow/contrib/operators/vertica_to_mysql.py | 49 - .../operators/wasb_delete_blob_operator.py | 31 - airflow/contrib/operators/winrm_operator.py | 28 - airflow/contrib/secrets/__init__.py | 29 + .../contrib/secrets/aws_secrets_manager.py | 29 - .../contrib/secrets/aws_systems_manager.py | 29 - airflow/contrib/secrets/azure_key_vault.py | 29 - .../contrib/secrets/gcp_secrets_manager.py | 45 - airflow/contrib/secrets/hashicorp_vault.py | 29 - airflow/contrib/sensors/__init__.py | 113 ++ airflow/contrib/sensors/aws_athena_sensor.py | 29 - .../aws_glue_catalog_partition_sensor.py | 33 - .../sensors/aws_redshift_cluster_sensor.py | 33 - airflow/contrib/sensors/aws_sqs_sensor.py | 45 - .../contrib/sensors/azure_cosmos_sensor.py | 28 - airflow/contrib/sensors/bash_sensor.py | 26 - airflow/contrib/sensors/bigquery_sensor.py | 44 - .../sensors/cassandra_record_sensor.py | 29 - .../contrib/sensors/cassandra_table_sensor.py | 29 - .../contrib/sensors/celery_queue_sensor.py | 28 - airflow/contrib/sensors/datadog_sensor.py | 28 - airflow/contrib/sensors/emr_base_sensor.py | 31 - .../contrib/sensors/emr_job_flow_sensor.py | 33 - airflow/contrib/sensors/emr_step_sensor.py | 31 - airflow/contrib/sensors/file_sensor.py | 26 - airflow/contrib/sensors/ftp_sensor.py | 28 - .../contrib/sensors/gcp_transfer_sensor.py | 51 - airflow/contrib/sensors/gcs_sensor.py | 97 -- airflow/contrib/sensors/hdfs_sensor.py | 67 - .../contrib/sensors/imap_attachment_sensor.py | 28 - airflow/contrib/sensors/jira_sensor.py | 29 - airflow/contrib/sensors/mongo_sensor.py | 28 - airflow/contrib/sensors/pubsub_sensor.py | 28 - airflow/contrib/sensors/python_sensor.py | 26 - airflow/contrib/sensors/qubole_sensor.py | 32 - airflow/contrib/sensors/redis_key_sensor.py | 28 - .../contrib/sensors/redis_pub_sub_sensor.py | 28 - .../contrib/sensors/sagemaker_base_sensor.py | 33 - .../sensors/sagemaker_endpoint_sensor.py | 33 - .../sensors/sagemaker_training_sensor.py | 28 - .../sensors/sagemaker_transform_sensor.py | 33 - .../sensors/sagemaker_tuning_sensor.py | 33 - airflow/contrib/sensors/sftp_sensor.py | 28 - airflow/contrib/sensors/wasb_sensor.py | 28 - airflow/contrib/sensors/weekday_sensor.py | 28 - airflow/contrib/task_runner/__init__.py | 15 + .../contrib/task_runner/cgroup_task_runner.py | 28 - airflow/contrib/utils/__init__.py | 283 ++++ airflow/contrib/utils/gcp_field_sanitizer.py | 31 - airflow/contrib/utils/gcp_field_validator.py | 32 - airflow/contrib/utils/log/__init__.py | 11 + .../log/task_handler_with_custom_formatter.py | 27 - .../contrib/utils/mlengine_operator_utils.py | 31 - .../utils/mlengine_prediction_summary.py | 32 - airflow/contrib/utils/sendgrid.py | 36 - airflow/contrib/utils/weekday.py | 24 - airflow/utils/deprecation_tools.py | 47 + dev/contrib/move_contrib.py | 84 + newsfragments/26153.significant.rst | 1 + tests/deprecated_classes.py | 1436 +---------------- 244 files changed, 1532 insertions(+), 10684 deletions(-) delete mode 100644 airflow/contrib/hooks/aws_athena_hook.py delete mode 100644 airflow/contrib/hooks/aws_datasync_hook.py delete mode 100644 airflow/contrib/hooks/aws_dynamodb_hook.py delete mode 100644 airflow/contrib/hooks/aws_firehose_hook.py delete mode 100644 airflow/contrib/hooks/aws_glue_catalog_hook.py delete mode 100644 airflow/contrib/hooks/aws_hook.py delete mode 100644 airflow/contrib/hooks/aws_lambda_hook.py delete mode 100644 airflow/contrib/hooks/aws_logs_hook.py delete mode 100644 airflow/contrib/hooks/aws_sns_hook.py delete mode 100644 airflow/contrib/hooks/aws_sqs_hook.py delete mode 100644 airflow/contrib/hooks/azure_container_instance_hook.py delete mode 100644 airflow/contrib/hooks/azure_container_registry_hook.py delete mode 100644 airflow/contrib/hooks/azure_container_volume_hook.py delete mode 100644 airflow/contrib/hooks/azure_cosmos_hook.py delete mode 100644 airflow/contrib/hooks/azure_data_lake_hook.py delete mode 100644 airflow/contrib/hooks/azure_fileshare_hook.py delete mode 100644 airflow/contrib/hooks/bigquery_hook.py delete mode 100644 airflow/contrib/hooks/cassandra_hook.py delete mode 100644 airflow/contrib/hooks/cloudant_hook.py delete mode 100644 airflow/contrib/hooks/databricks_hook.py delete mode 100644 airflow/contrib/hooks/datadog_hook.py delete mode 100644 airflow/contrib/hooks/datastore_hook.py delete mode 100644 airflow/contrib/hooks/dingding_hook.py delete mode 100644 airflow/contrib/hooks/discord_webhook_hook.py delete mode 100644 airflow/contrib/hooks/emr_hook.py delete mode 100644 airflow/contrib/hooks/fs_hook.py delete mode 100644 airflow/contrib/hooks/ftp_hook.py delete mode 100644 airflow/contrib/hooks/gcp_api_base_hook.py delete mode 100644 airflow/contrib/hooks/gcp_bigtable_hook.py delete mode 100644 airflow/contrib/hooks/gcp_cloud_build_hook.py delete mode 100644 airflow/contrib/hooks/gcp_compute_hook.py delete mode 100644 airflow/contrib/hooks/gcp_container_hook.py delete mode 100644 airflow/contrib/hooks/gcp_dataflow_hook.py delete mode 100644 airflow/contrib/hooks/gcp_dataproc_hook.py delete mode 100644 airflow/contrib/hooks/gcp_dlp_hook.py delete mode 100644 airflow/contrib/hooks/gcp_function_hook.py delete mode 100644 airflow/contrib/hooks/gcp_kms_hook.py delete mode 100644 airflow/contrib/hooks/gcp_mlengine_hook.py delete mode 100644 airflow/contrib/hooks/gcp_natural_language_hook.py delete mode 100644 airflow/contrib/hooks/gcp_pubsub_hook.py delete mode 100644 airflow/contrib/hooks/gcp_spanner_hook.py delete mode 100644 airflow/contrib/hooks/gcp_speech_to_text_hook.py delete mode 100644 airflow/contrib/hooks/gcp_sql_hook.py delete mode 100644 airflow/contrib/hooks/gcp_tasks_hook.py delete mode 100644 airflow/contrib/hooks/gcp_text_to_speech_hook.py delete mode 100644 airflow/contrib/hooks/gcp_transfer_hook.py delete mode 100644 airflow/contrib/hooks/gcp_translate_hook.py delete mode 100644 airflow/contrib/hooks/gcp_video_intelligence_hook.py delete mode 100644 airflow/contrib/hooks/gcp_vision_hook.py delete mode 100644 airflow/contrib/hooks/gcs_hook.py delete mode 100644 airflow/contrib/hooks/gdrive_hook.py delete mode 100644 airflow/contrib/hooks/grpc_hook.py delete mode 100644 airflow/contrib/hooks/imap_hook.py delete mode 100644 airflow/contrib/hooks/jenkins_hook.py delete mode 100644 airflow/contrib/hooks/jira_hook.py delete mode 100644 airflow/contrib/hooks/mongo_hook.py delete mode 100644 airflow/contrib/hooks/openfaas_hook.py delete mode 100644 airflow/contrib/hooks/opsgenie_alert_hook.py delete mode 100644 airflow/contrib/hooks/pagerduty_hook.py delete mode 100644 airflow/contrib/hooks/pinot_hook.py delete mode 100644 airflow/contrib/hooks/qubole_check_hook.py delete mode 100644 airflow/contrib/hooks/qubole_hook.py delete mode 100644 airflow/contrib/hooks/redis_hook.py delete mode 100644 airflow/contrib/hooks/redshift_hook.py delete mode 100644 airflow/contrib/hooks/sagemaker_hook.py delete mode 100644 airflow/contrib/hooks/salesforce_hook.py delete mode 100644 airflow/contrib/hooks/segment_hook.py delete mode 100644 airflow/contrib/hooks/sftp_hook.py delete mode 100644 airflow/contrib/hooks/slack_webhook_hook.py delete mode 100644 airflow/contrib/hooks/snowflake_hook.py delete mode 100644 airflow/contrib/hooks/spark_jdbc_hook.py delete mode 100644 airflow/contrib/hooks/spark_sql_hook.py delete mode 100644 airflow/contrib/hooks/spark_submit_hook.py delete mode 100644 airflow/contrib/hooks/sqoop_hook.py delete mode 100644 airflow/contrib/hooks/ssh_hook.py delete mode 100644 airflow/contrib/hooks/vertica_hook.py delete mode 100644 airflow/contrib/hooks/wasb_hook.py delete mode 100644 airflow/contrib/hooks/winrm_hook.py delete mode 100644 airflow/contrib/operators/adls_list_operator.py delete mode 100644 airflow/contrib/operators/adls_to_gcs.py delete mode 100644 airflow/contrib/operators/aws_athena_operator.py delete mode 100644 airflow/contrib/operators/aws_sqs_publish_operator.py delete mode 100644 airflow/contrib/operators/awsbatch_operator.py delete mode 100644 airflow/contrib/operators/azure_container_instances_operator.py delete mode 100644 airflow/contrib/operators/azure_cosmos_operator.py delete mode 100644 airflow/contrib/operators/bigquery_check_operator.py delete mode 100644 airflow/contrib/operators/bigquery_get_data.py delete mode 100644 airflow/contrib/operators/bigquery_operator.py delete mode 100644 airflow/contrib/operators/bigquery_table_delete_operator.py delete mode 100644 airflow/contrib/operators/bigquery_to_bigquery.py delete mode 100644 airflow/contrib/operators/bigquery_to_gcs.py delete mode 100644 airflow/contrib/operators/bigquery_to_mysql_operator.py delete mode 100644 airflow/contrib/operators/cassandra_to_gcs.py delete mode 100644 airflow/contrib/operators/databricks_operator.py delete mode 100644 airflow/contrib/operators/dataflow_operator.py delete mode 100644 airflow/contrib/operators/dataproc_operator.py delete mode 100644 airflow/contrib/operators/datastore_export_operator.py delete mode 100644 airflow/contrib/operators/datastore_import_operator.py delete mode 100644 airflow/contrib/operators/dingding_operator.py delete mode 100644 airflow/contrib/operators/discord_webhook_operator.py delete mode 100644 airflow/contrib/operators/docker_swarm_operator.py delete mode 100644 airflow/contrib/operators/druid_operator.py delete mode 100644 airflow/contrib/operators/dynamodb_to_s3.py delete mode 100644 airflow/contrib/operators/ecs_operator.py delete mode 100644 airflow/contrib/operators/emr_add_steps_operator.py delete mode 100644 airflow/contrib/operators/emr_create_job_flow_operator.py delete mode 100644 airflow/contrib/operators/emr_terminate_job_flow_operator.py delete mode 100644 airflow/contrib/operators/file_to_gcs.py delete mode 100644 airflow/contrib/operators/file_to_wasb.py delete mode 100644 airflow/contrib/operators/gcp_bigtable_operator.py delete mode 100644 airflow/contrib/operators/gcp_cloud_build_operator.py delete mode 100644 airflow/contrib/operators/gcp_compute_operator.py delete mode 100644 airflow/contrib/operators/gcp_container_operator.py delete mode 100644 airflow/contrib/operators/gcp_dlp_operator.py delete mode 100644 airflow/contrib/operators/gcp_function_operator.py delete mode 100644 airflow/contrib/operators/gcp_natural_language_operator.py delete mode 100644 airflow/contrib/operators/gcp_spanner_operator.py delete mode 100644 airflow/contrib/operators/gcp_speech_to_text_operator.py delete mode 100644 airflow/contrib/operators/gcp_sql_operator.py delete mode 100644 airflow/contrib/operators/gcp_tasks_operator.py delete mode 100644 airflow/contrib/operators/gcp_text_to_speech_operator.py delete mode 100644 airflow/contrib/operators/gcp_transfer_operator.py delete mode 100644 airflow/contrib/operators/gcp_translate_operator.py delete mode 100644 airflow/contrib/operators/gcp_translate_speech_operator.py delete mode 100644 airflow/contrib/operators/gcp_video_intelligence_operator.py delete mode 100644 airflow/contrib/operators/gcp_vision_operator.py delete mode 100644 airflow/contrib/operators/gcs_acl_operator.py delete mode 100644 airflow/contrib/operators/gcs_delete_operator.py delete mode 100644 airflow/contrib/operators/gcs_download_operator.py delete mode 100644 airflow/contrib/operators/gcs_list_operator.py delete mode 100644 airflow/contrib/operators/gcs_operator.py delete mode 100644 airflow/contrib/operators/gcs_to_bq.py delete mode 100644 airflow/contrib/operators/gcs_to_gcs.py delete mode 100644 airflow/contrib/operators/gcs_to_gcs_transfer_operator.py delete mode 100644 airflow/contrib/operators/gcs_to_gdrive_operator.py delete mode 100644 airflow/contrib/operators/gcs_to_s3.py delete mode 100644 airflow/contrib/operators/grpc_operator.py delete mode 100644 airflow/contrib/operators/hive_to_dynamodb.py delete mode 100644 airflow/contrib/operators/imap_attachment_to_s3_operator.py delete mode 100644 airflow/contrib/operators/jenkins_job_trigger_operator.py delete mode 100644 airflow/contrib/operators/jira_operator.py delete mode 100644 airflow/contrib/operators/kubernetes_pod_operator.py delete mode 100644 airflow/contrib/operators/mlengine_operator.py delete mode 100644 airflow/contrib/operators/mongo_to_s3.py delete mode 100644 airflow/contrib/operators/mssql_to_gcs.py delete mode 100644 airflow/contrib/operators/mysql_to_gcs.py delete mode 100644 airflow/contrib/operators/opsgenie_alert_operator.py delete mode 100644 airflow/contrib/operators/oracle_to_azure_data_lake_transfer.py delete mode 100644 airflow/contrib/operators/oracle_to_oracle_transfer.py delete mode 100644 airflow/contrib/operators/postgres_to_gcs_operator.py delete mode 100644 airflow/contrib/operators/pubsub_operator.py delete mode 100644 airflow/contrib/operators/qubole_check_operator.py delete mode 100644 airflow/contrib/operators/qubole_operator.py delete mode 100644 airflow/contrib/operators/redis_publish_operator.py delete mode 100644 airflow/contrib/operators/s3_copy_object_operator.py delete mode 100644 airflow/contrib/operators/s3_delete_objects_operator.py delete mode 100644 airflow/contrib/operators/s3_list_operator.py delete mode 100644 airflow/contrib/operators/s3_to_gcs_operator.py delete mode 100644 airflow/contrib/operators/s3_to_gcs_transfer_operator.py delete mode 100644 airflow/contrib/operators/s3_to_sftp_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_base_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_endpoint_config_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_endpoint_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_model_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_training_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_transform_operator.py delete mode 100644 airflow/contrib/operators/sagemaker_tuning_operator.py delete mode 100644 airflow/contrib/operators/segment_track_event_operator.py delete mode 100644 airflow/contrib/operators/sftp_operator.py delete mode 100644 airflow/contrib/operators/sftp_to_s3_operator.py delete mode 100644 airflow/contrib/operators/slack_webhook_operator.py delete mode 100644 airflow/contrib/operators/snowflake_operator.py delete mode 100644 airflow/contrib/operators/sns_publish_operator.py delete mode 100644 airflow/contrib/operators/spark_jdbc_operator.py delete mode 100644 airflow/contrib/operators/spark_sql_operator.py delete mode 100644 airflow/contrib/operators/spark_submit_operator.py delete mode 100644 airflow/contrib/operators/sql_to_gcs.py delete mode 100644 airflow/contrib/operators/sqoop_operator.py delete mode 100644 airflow/contrib/operators/ssh_operator.py delete mode 100644 airflow/contrib/operators/vertica_operator.py delete mode 100644 airflow/contrib/operators/vertica_to_hive.py delete mode 100644 airflow/contrib/operators/vertica_to_mysql.py delete mode 100644 airflow/contrib/operators/wasb_delete_blob_operator.py delete mode 100644 airflow/contrib/operators/winrm_operator.py delete mode 100644 airflow/contrib/secrets/aws_secrets_manager.py delete mode 100644 airflow/contrib/secrets/aws_systems_manager.py delete mode 100644 airflow/contrib/secrets/azure_key_vault.py delete mode 100644 airflow/contrib/secrets/gcp_secrets_manager.py delete mode 100644 airflow/contrib/secrets/hashicorp_vault.py delete mode 100644 airflow/contrib/sensors/aws_athena_sensor.py delete mode 100644 airflow/contrib/sensors/aws_glue_catalog_partition_sensor.py delete mode 100644 airflow/contrib/sensors/aws_redshift_cluster_sensor.py delete mode 100644 airflow/contrib/sensors/aws_sqs_sensor.py delete mode 100644 airflow/contrib/sensors/azure_cosmos_sensor.py delete mode 100644 airflow/contrib/sensors/bash_sensor.py delete mode 100644 airflow/contrib/sensors/bigquery_sensor.py delete mode 100644 airflow/contrib/sensors/cassandra_record_sensor.py delete mode 100644 airflow/contrib/sensors/cassandra_table_sensor.py delete mode 100644 airflow/contrib/sensors/celery_queue_sensor.py delete mode 100644 airflow/contrib/sensors/datadog_sensor.py delete mode 100644 airflow/contrib/sensors/emr_base_sensor.py delete mode 100644 airflow/contrib/sensors/emr_job_flow_sensor.py delete mode 100644 airflow/contrib/sensors/emr_step_sensor.py delete mode 100644 airflow/contrib/sensors/file_sensor.py delete mode 100644 airflow/contrib/sensors/ftp_sensor.py delete mode 100644 airflow/contrib/sensors/gcp_transfer_sensor.py delete mode 100644 airflow/contrib/sensors/gcs_sensor.py delete mode 100644 airflow/contrib/sensors/hdfs_sensor.py delete mode 100644 airflow/contrib/sensors/imap_attachment_sensor.py delete mode 100644 airflow/contrib/sensors/jira_sensor.py delete mode 100644 airflow/contrib/sensors/mongo_sensor.py delete mode 100644 airflow/contrib/sensors/pubsub_sensor.py delete mode 100644 airflow/contrib/sensors/python_sensor.py delete mode 100644 airflow/contrib/sensors/qubole_sensor.py delete mode 100644 airflow/contrib/sensors/redis_key_sensor.py delete mode 100644 airflow/contrib/sensors/redis_pub_sub_sensor.py delete mode 100644 airflow/contrib/sensors/sagemaker_base_sensor.py delete mode 100644 airflow/contrib/sensors/sagemaker_endpoint_sensor.py delete mode 100644 airflow/contrib/sensors/sagemaker_training_sensor.py delete mode 100644 airflow/contrib/sensors/sagemaker_transform_sensor.py delete mode 100644 airflow/contrib/sensors/sagemaker_tuning_sensor.py delete mode 100644 airflow/contrib/sensors/sftp_sensor.py delete mode 100644 airflow/contrib/sensors/wasb_sensor.py delete mode 100644 airflow/contrib/sensors/weekday_sensor.py delete mode 100644 airflow/contrib/task_runner/cgroup_task_runner.py delete mode 100644 airflow/contrib/utils/gcp_field_sanitizer.py delete mode 100644 airflow/contrib/utils/gcp_field_validator.py delete mode 100644 airflow/contrib/utils/log/task_handler_with_custom_formatter.py delete mode 100644 airflow/contrib/utils/mlengine_operator_utils.py delete mode 100644 airflow/contrib/utils/mlengine_prediction_summary.py delete mode 100644 airflow/contrib/utils/sendgrid.py delete mode 100644 airflow/contrib/utils/weekday.py create mode 100644 airflow/utils/deprecation_tools.py create mode 100644 dev/contrib/move_contrib.py create mode 100644 newsfragments/26153.significant.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 424403263cf14..550a0ea9f9a70 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -150,7 +150,7 @@ repos: - id: black name: Run Black (the uncompromising Python code formatter) args: [--config=./pyproject.toml] - exclude: ^airflow/_vendor/ + exclude: ^airflow/_vendor/|^airflow/contrib - repo: https://github.com/asottile/blacken-docs rev: v1.12.1 hooks: diff --git a/airflow/contrib/hooks/__init__.py b/airflow/contrib/hooks/__init__.py index c861d649e4a49..fe483d80c2cc5 100644 --- a/airflow/contrib/hooks/__init__.py +++ b/airflow/contrib/hooks/__init__.py @@ -17,11 +17,293 @@ # under the License. # """This package is deprecated. Please use `airflow.hooks` or `airflow.providers.*.hooks`.""" - import warnings +from airflow.utils.deprecation_tools import add_deprecated_classes + warnings.warn( "This package is deprecated. Please use `airflow.hooks` or `airflow.providers.*.hooks`.", DeprecationWarning, stacklevel=2, ) + +__deprecated_classes = { + 'aws_athena_hook': { + 'AWSAthenaHook': 'airflow.providers.amazon.aws.hooks.athena.AthenaHook', + }, + 'aws_datasync_hook': { + 'AWSDataSyncHook': 'airflow.providers.amazon.aws.hooks.datasync.DataSyncHook', + }, + 'aws_dynamodb_hook': { + 'AwsDynamoDBHook': 'airflow.providers.amazon.aws.hooks.dynamodb.DynamoDBHook', + }, + 'aws_firehose_hook': { + 'FirehoseHook': 'airflow.providers.amazon.aws.hooks.kinesis.FirehoseHook', + }, + 'aws_glue_catalog_hook': { + 'AwsGlueCatalogHook': 'airflow.providers.amazon.aws.hooks.glue_catalog.GlueCatalogHook', + }, + 'aws_hook': { + 'AwsBaseHook': 'airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook', + '_parse_s3_config': 'airflow.providers.amazon.aws.hooks.base_aws._parse_s3_config', + 'boto3': 'airflow.providers.amazon.aws.hooks.base_aws.boto3', + }, + 'aws_lambda_hook': { + 'AwsLambdaHook': 'airflow.providers.amazon.aws.hooks.lambda_function.LambdaHook', + }, + 'aws_logs_hook': { + 'AwsLogsHook': 'airflow.providers.amazon.aws.hooks.logs.AwsLogsHook', + }, + 'aws_sns_hook': { + 'AwsSnsHook': 'airflow.providers.amazon.aws.hooks.sns.SnsHook', + }, + 'aws_sqs_hook': { + 'SqsHook': 'airflow.providers.amazon.aws.hooks.sqs.SqsHook', + }, + 'azure_container_instance_hook': { + 'AzureContainerInstanceHook': + 'airflow.providers.microsoft.azure.hooks.container_instance.AzureContainerInstanceHook', + }, + 'azure_container_registry_hook': { + 'AzureContainerRegistryHook': + 'airflow.providers.microsoft.azure.hooks.container_registry.AzureContainerRegistryHook', + }, + 'azure_container_volume_hook': { + 'AzureContainerVolumeHook': + 'airflow.providers.microsoft.azure.hooks.container_volume.AzureContainerVolumeHook', + }, + 'azure_cosmos_hook': { + 'AzureCosmosDBHook': 'airflow.providers.microsoft.azure.hooks.cosmos.AzureCosmosDBHook', + }, + 'azure_data_lake_hook': { + 'AzureDataLakeHook': 'airflow.providers.microsoft.azure.hooks.data_lake.AzureDataLakeHook', + }, + 'azure_fileshare_hook': { + 'AzureFileShareHook': 'airflow.providers.microsoft.azure.hooks.fileshare.AzureFileShareHook', + }, + 'bigquery_hook': { + 'BigQueryBaseCursor': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryBaseCursor', + 'BigQueryConnection': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryConnection', + 'BigQueryCursor': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryCursor', + 'BigQueryHook': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryHook', + 'GbqConnector': 'airflow.providers.google.cloud.hooks.bigquery.GbqConnector', + }, + 'cassandra_hook': { + 'CassandraHook': 'airflow.providers.apache.cassandra.hooks.cassandra.CassandraHook', + }, + 'cloudant_hook': { + 'CloudantHook': 'airflow.providers.cloudant.hooks.cloudant.CloudantHook', + }, + 'databricks_hook': { + 'CANCEL_RUN_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.CANCEL_RUN_ENDPOINT', + 'GET_RUN_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.GET_RUN_ENDPOINT', + 'RESTART_CLUSTER_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.RESTART_CLUSTER_ENDPOINT', + 'RUN_LIFE_CYCLE_STATES': 'airflow.providers.databricks.hooks.databricks.RUN_LIFE_CYCLE_STATES', + 'RUN_NOW_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.RUN_NOW_ENDPOINT', + 'START_CLUSTER_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.START_CLUSTER_ENDPOINT', + 'SUBMIT_RUN_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.SUBMIT_RUN_ENDPOINT', + 'TERMINATE_CLUSTER_ENDPOINT': + 'airflow.providers.databricks.hooks.databricks.TERMINATE_CLUSTER_ENDPOINT', + 'DatabricksHook': 'airflow.providers.databricks.hooks.databricks.DatabricksHook', + 'RunState': 'airflow.providers.databricks.hooks.databricks.RunState', + }, + 'datadog_hook': { + 'DatadogHook': 'airflow.providers.datadog.hooks.datadog.DatadogHook', + }, + 'datastore_hook': { + 'DatastoreHook': 'airflow.providers.google.cloud.hooks.datastore.DatastoreHook', + }, + 'dingding_hook': { + 'DingdingHook': 'airflow.providers.dingding.hooks.dingding.DingdingHook', + 'requests': 'airflow.providers.dingding.hooks.dingding.requests', + }, + 'discord_webhook_hook': { + 'DiscordWebhookHook': 'airflow.providers.discord.hooks.discord_webhook.DiscordWebhookHook', + }, + 'emr_hook': { + 'EmrHook': 'airflow.providers.amazon.aws.hooks.emr.EmrHook', + }, + 'fs_hook': { + 'FSHook': 'airflow.hooks.filesystem.FSHook', + }, + 'ftp_hook': { + 'FTPHook': 'airflow.providers.ftp.hooks.ftp.FTPHook', + 'FTPSHook': 'airflow.providers.ftp.hooks.ftp.FTPSHook', + }, + 'gcp_api_base_hook': { + 'GoogleBaseHook': 'airflow.providers.google.common.hooks.base_google.GoogleBaseHook', + }, + 'gcp_bigtable_hook': { + 'BigtableHook': 'airflow.providers.google.cloud.hooks.bigtable.BigtableHook', + }, + 'gcp_cloud_build_hook': { + 'CloudBuildHook': 'airflow.providers.google.cloud.hooks.cloud_build.CloudBuildHook', + }, + 'gcp_compute_hook': { + 'ComputeEngineHook': 'airflow.providers.google.cloud.hooks.compute.ComputeEngineHook', + }, + 'gcp_container_hook': { + 'GKEHook': 'airflow.providers.google.cloud.hooks.kubernetes_engine.GKEHook', + }, + 'gcp_dataflow_hook': { + 'DataflowHook': 'airflow.providers.google.cloud.hooks.dataflow.DataflowHook', + }, + 'gcp_dataproc_hook': { + 'DataprocHook': 'airflow.providers.google.cloud.hooks.dataproc.DataprocHook', + }, + 'gcp_dlp_hook': { + 'CloudDLPHook': 'airflow.providers.google.cloud.hooks.dlp.CloudDLPHook', + 'DlpJob': 'airflow.providers.google.cloud.hooks.dlp.DlpJob', + }, + 'gcp_function_hook': { + 'CloudFunctionsHook': 'airflow.providers.google.cloud.hooks.functions.CloudFunctionsHook', + }, + 'gcp_kms_hook': { + 'CloudKMSHook': 'airflow.providers.google.cloud.hooks.kms.CloudKMSHook', + }, + 'gcp_mlengine_hook': { + 'MLEngineHook': 'airflow.providers.google.cloud.hooks.mlengine.MLEngineHook', + }, + 'gcp_natural_language_hook': { + 'CloudNaturalLanguageHook': + 'airflow.providers.google.cloud.hooks.natural_language.CloudNaturalLanguageHook', + }, + 'gcp_pubsub_hook': { + 'PubSubException': 'airflow.providers.google.cloud.hooks.pubsub.PubSubException', + 'PubSubHook': 'airflow.providers.google.cloud.hooks.pubsub.PubSubHook', + }, + 'gcp_spanner_hook': { + 'SpannerHook': 'airflow.providers.google.cloud.hooks.spanner.SpannerHook', + }, + 'gcp_speech_to_text_hook': { + 'CloudSpeechToTextHook': 'airflow.providers.google.cloud.hooks.speech_to_text.CloudSpeechToTextHook', + }, + 'gcp_sql_hook': { + 'CloudSQLDatabaseHook': 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook', + 'CloudSQLHook': 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLHook', + }, + 'gcp_tasks_hook': { + 'CloudTasksHook': 'airflow.providers.google.cloud.hooks.tasks.CloudTasksHook', + }, + 'gcp_text_to_speech_hook': { + 'CloudTextToSpeechHook': 'airflow.providers.google.cloud.hooks.text_to_speech.CloudTextToSpeechHook', + }, + 'gcp_transfer_hook': { + 'CloudDataTransferServiceHook': + 'airflow.providers.google.cloud.hooks.cloud_storage_transfer_service.' + 'CloudDataTransferServiceHook', + }, + 'gcp_translate_hook': { + 'CloudTranslateHook': 'airflow.providers.google.cloud.hooks.translate.CloudTranslateHook', + }, + 'gcp_video_intelligence_hook': { + 'CloudVideoIntelligenceHook': + 'airflow.providers.google.cloud.hooks.video_intelligence.CloudVideoIntelligenceHook', + }, + 'gcp_vision_hook': { + 'CloudVisionHook': 'airflow.providers.google.cloud.hooks.vision.CloudVisionHook', + }, + 'gcs_hook': { + 'GCSHook': 'airflow.providers.google.cloud.hooks.gcs.GCSHook', + }, + 'gdrive_hook': { + 'GoogleDriveHook': 'airflow.providers.google.suite.hooks.drive.GoogleDriveHook', + }, + 'grpc_hook': { + 'GrpcHook': 'airflow.providers.grpc.hooks.grpc.GrpcHook', + }, + 'imap_hook': { + 'ImapHook': 'airflow.providers.imap.hooks.imap.ImapHook', + 'Mail': 'airflow.providers.imap.hooks.imap.Mail', + 'MailPart': 'airflow.providers.imap.hooks.imap.MailPart', + }, + 'jenkins_hook': { + 'JenkinsHook': 'airflow.providers.jenkins.hooks.jenkins.JenkinsHook', + }, + 'jira_hook': { + 'JiraHook': 'airflow.providers.atlassian.jira.hooks.jira.JiraHook', + }, + 'mongo_hook': { + 'MongoHook': 'airflow.providers.mongo.hooks.mongo.MongoHook', + }, + 'openfaas_hook': { + 'OK_STATUS_CODE': 'airflow.providers.openfaas.hooks.openfaas.OK_STATUS_CODE', + 'OpenFaasHook': 'airflow.providers.openfaas.hooks.openfaas.OpenFaasHook', + 'requests': 'airflow.providers.openfaas.hooks.openfaas.requests', + }, + 'opsgenie_alert_hook': { + 'OpsgenieAlertHook': 'airflow.providers.opsgenie.hooks.opsgenie.OpsgenieAlertHook', + }, + 'pagerduty_hook': { + 'PagerdutyHook': 'airflow.providers.pagerduty.hooks.pagerduty.PagerdutyHook', + }, + 'pinot_hook': { + 'PinotAdminHook': 'airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook', + 'PinotDbApiHook': 'airflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook', + }, + 'qubole_check_hook': { + 'QuboleCheckHook': 'airflow.providers.qubole.hooks.qubole_check.QuboleCheckHook', + }, + 'qubole_hook': { + 'QuboleHook': 'airflow.providers.qubole.hooks.qubole.QuboleHook', + }, + 'redis_hook': { + 'RedisHook': 'airflow.providers.redis.hooks.redis.RedisHook', + }, + 'redshift_hook': { + 'RedshiftHook': 'airflow.providers.amazon.aws.hooks.redshift_cluster.RedshiftHook', + }, + 'sagemaker_hook': { + 'LogState': 'airflow.providers.amazon.aws.hooks.sagemaker.LogState', + 'Position': 'airflow.providers.amazon.aws.hooks.sagemaker.Position', + 'SageMakerHook': 'airflow.providers.amazon.aws.hooks.sagemaker.SageMakerHook', + 'argmin': 'airflow.providers.amazon.aws.hooks.sagemaker.argmin', + 'secondary_training_status_changed': + 'airflow.providers.amazon.aws.hooks.sagemaker.secondary_training_status_changed', + 'secondary_training_status_message': + 'airflow.providers.amazon.aws.hooks.sagemaker.secondary_training_status_message', + }, + 'salesforce_hook': { + 'SalesforceHook': 'airflow.providers.salesforce.hooks.salesforce.SalesforceHook', + 'pd': 'airflow.providers.salesforce.hooks.salesforce.pd', + }, + 'segment_hook': { + 'SegmentHook': 'airflow.providers.segment.hooks.segment.SegmentHook', + 'analytics': 'airflow.providers.segment.hooks.segment.analytics', + }, + 'sftp_hook': { + 'SFTPHook': 'airflow.providers.sftp.hooks.sftp.SFTPHook', + }, + 'slack_webhook_hook': { + 'SlackWebhookHook': 'airflow.providers.slack.hooks.slack_webhook.SlackWebhookHook', + }, + 'snowflake_hook': { + 'SnowflakeHook': 'airflow.providers.snowflake.hooks.snowflake.SnowflakeHook', + }, + 'spark_jdbc_hook': { + 'SparkJDBCHook': 'airflow.providers.apache.spark.hooks.spark_jdbc.SparkJDBCHook', + }, + 'spark_sql_hook': { + 'SparkSqlHook': 'airflow.providers.apache.spark.hooks.spark_sql.SparkSqlHook', + }, + 'spark_submit_hook': { + 'SparkSubmitHook': 'airflow.providers.apache.spark.hooks.spark_submit.SparkSubmitHook', + }, + 'sqoop_hook': { + 'SqoopHook': 'airflow.providers.apache.sqoop.hooks.sqoop.SqoopHook', + }, + 'ssh_hook': { + 'SSHHook': 'airflow.providers.ssh.hooks.ssh.SSHHook', + }, + 'vertica_hook': { + 'VerticaHook': 'airflow.providers.vertica.hooks.vertica.VerticaHook', + }, + 'wasb_hook': { + 'WasbHook': 'airflow.providers.microsoft.azure.hooks.wasb.WasbHook', + }, + 'winrm_hook': { + 'WinRMHook': 'airflow.providers.microsoft.winrm.hooks.winrm.WinRMHook', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/hooks/aws_athena_hook.py b/airflow/contrib/hooks/aws_athena_hook.py deleted file mode 100644 index d2d0b8017662b..0000000000000 --- a/airflow/contrib/hooks/aws_athena_hook.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.athena`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.athena import AthenaHook as AWSAthenaHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.athena`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_datasync_hook.py b/airflow/contrib/hooks/aws_datasync_hook.py deleted file mode 100644 index 1ec08415062cc..0000000000000 --- a/airflow/contrib/hooks/aws_datasync_hook.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.datasync`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.datasync import DataSyncHook as AWSDataSyncHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.datasync`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_dynamodb_hook.py b/airflow/contrib/hooks/aws_dynamodb_hook.py deleted file mode 100644 index e87d59c61c515..0000000000000 --- a/airflow/contrib/hooks/aws_dynamodb_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.dynamodb`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.dynamodb import DynamoDBHook as AwsDynamoDBHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.dynamodb`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_firehose_hook.py b/airflow/contrib/hooks/aws_firehose_hook.py deleted file mode 100644 index 381971004885f..0000000000000 --- a/airflow/contrib/hooks/aws_firehose_hook.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.kinesis`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.kinesis import FirehoseHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.kinesis`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_glue_catalog_hook.py b/airflow/contrib/hooks/aws_glue_catalog_hook.py deleted file mode 100644 index 9ff0c9a963759..0000000000000 --- a/airflow/contrib/hooks/aws_glue_catalog_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.glue_catalog`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.glue_catalog import GlueCatalogHook as AwsGlueCatalogHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.glue_catalog`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_hook.py b/airflow/contrib/hooks/aws_hook.py deleted file mode 100644 index c40e32c0305f1..0000000000000 --- a/airflow/contrib/hooks/aws_hook.py +++ /dev/null @@ -1,43 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.base_aws`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook, _parse_s3_config, boto3 # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.base_aws`.", - DeprecationWarning, - stacklevel=2, -) - - -class AwsHook(AwsBaseHook): - """ - This class is deprecated. - Please use :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use `airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/aws_lambda_hook.py b/airflow/contrib/hooks/aws_lambda_hook.py deleted file mode 100644 index a6328d7471ca4..0000000000000 --- a/airflow/contrib/hooks/aws_lambda_hook.py +++ /dev/null @@ -1,32 +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. - -""" -This module is deprecated. -Please use :mod:`airflow.providers.amazon.aws.hooks.lambda_function`. -""" - -import warnings - -from airflow.providers.amazon.aws.hooks.lambda_function import LambdaHook as AwsLambdaHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.lambda_function`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_logs_hook.py b/airflow/contrib/hooks/aws_logs_hook.py deleted file mode 100644 index 9b9c449f8415e..0000000000000 --- a/airflow/contrib/hooks/aws_logs_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.logs`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.logs import AwsLogsHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.logs`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_sns_hook.py b/airflow/contrib/hooks/aws_sns_hook.py deleted file mode 100644 index 1b846b396e0d2..0000000000000 --- a/airflow/contrib/hooks/aws_sns_hook.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.sns`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.sns import SnsHook as AwsSnsHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.sns`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/aws_sqs_hook.py b/airflow/contrib/hooks/aws_sqs_hook.py deleted file mode 100644 index aafd8379ab5dd..0000000000000 --- a/airflow/contrib/hooks/aws_sqs_hook.py +++ /dev/null @@ -1,44 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.sqs`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.sqs import SqsHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.sqs`.", - DeprecationWarning, - stacklevel=2, -) - - -class SQSHook(SqsHook): - """ - This class is deprecated. - Please use :class:`airflow.providers.amazon.aws.hooks.sqs.SqsHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use `airflow.providers.amazon.aws.hooks.sqs.SqsHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/azure_container_instance_hook.py b/airflow/contrib/hooks/azure_container_instance_hook.py deleted file mode 100644 index 9fefa5c679d38..0000000000000 --- a/airflow/contrib/hooks/azure_container_instance_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.container_instance`.""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.container_instance import AzureContainerInstanceHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.container_instance`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/azure_container_registry_hook.py b/airflow/contrib/hooks/azure_container_registry_hook.py deleted file mode 100644 index 14e55ef820737..0000000000000 --- a/airflow/contrib/hooks/azure_container_registry_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.container_registry`.""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.container_registry import AzureContainerRegistryHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.container_registry`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/azure_container_volume_hook.py b/airflow/contrib/hooks/azure_container_volume_hook.py deleted file mode 100644 index facfdaca4cc8a..0000000000000 --- a/airflow/contrib/hooks/azure_container_volume_hook.py +++ /dev/null @@ -1,31 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.microsoft.azure.hooks.container_volume`. -""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.container_volume import AzureContainerVolumeHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.container_volume`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/azure_cosmos_hook.py b/airflow/contrib/hooks/azure_cosmos_hook.py deleted file mode 100644 index 4152f15e9d7b1..0000000000000 --- a/airflow/contrib/hooks/azure_cosmos_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.cosmos`.""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.cosmos import AzureCosmosDBHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.cosmos`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/azure_data_lake_hook.py b/airflow/contrib/hooks/azure_data_lake_hook.py deleted file mode 100644 index 3442d1345078c..0000000000000 --- a/airflow/contrib/hooks/azure_data_lake_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.data_lake`.""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.data_lake import AzureDataLakeHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.data_lake`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/azure_fileshare_hook.py b/airflow/contrib/hooks/azure_fileshare_hook.py deleted file mode 100644 index f0a5b2ec4c9bb..0000000000000 --- a/airflow/contrib/hooks/azure_fileshare_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.fileshare`.""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.fileshare import AzureFileShareHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.fileshare`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/bigquery_hook.py b/airflow/contrib/hooks/bigquery_hook.py deleted file mode 100644 index e9e10402943a5..0000000000000 --- a/airflow/contrib/hooks/bigquery_hook.py +++ /dev/null @@ -1,34 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.bigquery import ( # noqa - BigQueryBaseCursor, - BigQueryConnection, - BigQueryCursor, - BigQueryHook, - GbqConnector, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.bigquery`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/cassandra_hook.py b/airflow/contrib/hooks/cassandra_hook.py deleted file mode 100644 index ea4c748c2bfc5..0000000000000 --- a/airflow/contrib/hooks/cassandra_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.cassandra.hooks.cassandra`.""" - -import warnings - -from airflow.providers.apache.cassandra.hooks.cassandra import CassandraHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.cassandra.hooks.cassandra`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/cloudant_hook.py b/airflow/contrib/hooks/cloudant_hook.py deleted file mode 100644 index ab7a1fa398fa7..0000000000000 --- a/airflow/contrib/hooks/cloudant_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.cloudant.hooks.cloudant`.""" - -import warnings - -from airflow.providers.cloudant.hooks.cloudant import CloudantHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.cloudant.hooks.cloudant`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/databricks_hook.py b/airflow/contrib/hooks/databricks_hook.py deleted file mode 100644 index 84746d39da8ae..0000000000000 --- a/airflow/contrib/hooks/databricks_hook.py +++ /dev/null @@ -1,39 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.databricks.hooks.databricks`.""" - -import warnings - -from airflow.providers.databricks.hooks.databricks import ( # noqa - CANCEL_RUN_ENDPOINT, - GET_RUN_ENDPOINT, - RESTART_CLUSTER_ENDPOINT, - RUN_LIFE_CYCLE_STATES, - RUN_NOW_ENDPOINT, - START_CLUSTER_ENDPOINT, - SUBMIT_RUN_ENDPOINT, - TERMINATE_CLUSTER_ENDPOINT, - DatabricksHook, - RunState, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.databricks.hooks.databricks`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/datadog_hook.py b/airflow/contrib/hooks/datadog_hook.py deleted file mode 100644 index be275e9adf81d..0000000000000 --- a/airflow/contrib/hooks/datadog_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.datadog.hooks.datadog`.""" - -import warnings - -from airflow.providers.datadog.hooks.datadog import DatadogHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.datadog.hooks.datadog`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/datastore_hook.py b/airflow/contrib/hooks/datastore_hook.py deleted file mode 100644 index 9898e2fb16814..0000000000000 --- a/airflow/contrib/hooks/datastore_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.datastore`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.datastore import DatastoreHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.datastore`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/dingding_hook.py b/airflow/contrib/hooks/dingding_hook.py deleted file mode 100644 index deff0414baf94..0000000000000 --- a/airflow/contrib/hooks/dingding_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.dingding.hooks.dingding`.""" - -import warnings - -from airflow.providers.dingding.hooks.dingding import DingdingHook, requests # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.dingding.hooks.dingding`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/discord_webhook_hook.py b/airflow/contrib/hooks/discord_webhook_hook.py deleted file mode 100644 index a907d2115a724..0000000000000 --- a/airflow/contrib/hooks/discord_webhook_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.discord.hooks.discord_webhook`.""" - -import warnings - -from airflow.providers.discord.hooks.discord_webhook import DiscordWebhookHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.discord.hooks.discord_webhook`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/emr_hook.py b/airflow/contrib/hooks/emr_hook.py deleted file mode 100644 index 1a15ee3edcd17..0000000000000 --- a/airflow/contrib/hooks/emr_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.emr`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.emr import EmrHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/fs_hook.py b/airflow/contrib/hooks/fs_hook.py deleted file mode 100644 index bc247c1948074..0000000000000 --- a/airflow/contrib/hooks/fs_hook.py +++ /dev/null @@ -1,26 +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. -"""This module is deprecated. Please use :mod:`airflow.hooks.filesystem`.""" - -import warnings - -from airflow.hooks.filesystem import FSHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.hooks.filesystem`.", DeprecationWarning, stacklevel=2 -) diff --git a/airflow/contrib/hooks/ftp_hook.py b/airflow/contrib/hooks/ftp_hook.py deleted file mode 100644 index 8d2e9cb06c843..0000000000000 --- a/airflow/contrib/hooks/ftp_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.ftp.hooks.ftp`.""" - -import warnings - -from airflow.providers.ftp.hooks.ftp import FTPHook, FTPSHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.ftp.hooks.ftp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_api_base_hook.py b/airflow/contrib/hooks/gcp_api_base_hook.py deleted file mode 100644 index 3226a8683d7a7..0000000000000 --- a/airflow/contrib/hooks/gcp_api_base_hook.py +++ /dev/null @@ -1,43 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.common.hooks.base_google`.""" -import warnings - -from airflow.providers.google.common.hooks.base_google import GoogleBaseHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.common.hooks.base_google`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudBaseHook(GoogleBaseHook): - """ - This class is deprecated. Please use - `airflow.providers.google.common.hooks.base_google.GoogleBaseHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use " - "`airflow.providers.google.common.hooks.base_google.GoogleBaseHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_bigtable_hook.py b/airflow/contrib/hooks/gcp_bigtable_hook.py deleted file mode 100644 index 47ccd2414a839..0000000000000 --- a/airflow/contrib/hooks/gcp_bigtable_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.bigtable`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.bigtable import BigtableHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.bigtable`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_cloud_build_hook.py b/airflow/contrib/hooks/gcp_cloud_build_hook.py deleted file mode 100644 index 691ae728a46d1..0000000000000 --- a/airflow/contrib/hooks/gcp_cloud_build_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.cloud_build`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.cloud_build import CloudBuildHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.cloud_build`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_compute_hook.py b/airflow/contrib/hooks/gcp_compute_hook.py deleted file mode 100644 index 5ac9df1378561..0000000000000 --- a/airflow/contrib/hooks/gcp_compute_hook.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.compute`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.compute import ComputeEngineHook - -warnings.warn( - "This module is deprecated. Please use airflow.providers.google.cloud.hooks.compute`", - DeprecationWarning, - stacklevel=2, -) - - -class GceHook(ComputeEngineHook): - """ - This class is deprecated. - Please use :class:`airflow.providers.google.cloud.hooks.compute.ComputeEngineHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use `airflow.providers.google.cloud.hooks.compute`.", - DeprecationWarning, - stacklevel=2, - ) - - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_container_hook.py b/airflow/contrib/hooks/gcp_container_hook.py deleted file mode 100644 index e825dbe5492c2..0000000000000 --- a/airflow/contrib/hooks/gcp_container_hook.py +++ /dev/null @@ -1,43 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.hooks.kubernetes_engine`. -""" - -import warnings - -from airflow.providers.google.cloud.hooks.kubernetes_engine import GKEHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.kubernetes_engine`", - DeprecationWarning, - stacklevel=2, -) - - -class GKEClusterHook(GKEHook): - """This class is deprecated. Please use `airflow.providers.google.cloud.hooks.container.GKEHook`.""" - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use `airflow.providers.google.cloud.hooks.container.GKEHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_dataflow_hook.py b/airflow/contrib/hooks/gcp_dataflow_hook.py deleted file mode 100644 index f489ffad82006..0000000000000 --- a/airflow/contrib/hooks/gcp_dataflow_hook.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.dataflow`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.dataflow import DataflowHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.dataflow`.", - DeprecationWarning, - stacklevel=2, -) - - -class DataFlowHook(DataflowHook): - """ - This class is deprecated. - Please use :class:`airflow.providers.google.cloud.hooks.dataflow.DataflowHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.google.cloud.hooks.dataflow.DataflowHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_dataproc_hook.py b/airflow/contrib/hooks/gcp_dataproc_hook.py deleted file mode 100644 index 1f02c6de42f7e..0000000000000 --- a/airflow/contrib/hooks/gcp_dataproc_hook.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.dataproc`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.dataproc import DataprocHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.dataproc`.", - DeprecationWarning, - stacklevel=2, -) - - -class DataProcHook(DataprocHook): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.hooks.dataproc.DataprocHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.hooks.dataproc.DataprocHook`.""", - DeprecationWarning, - stacklevel=2, - ) - - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_dlp_hook.py b/airflow/contrib/hooks/gcp_dlp_hook.py deleted file mode 100644 index 77a9da6b1a8a8..0000000000000 --- a/airflow/contrib/hooks/gcp_dlp_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.dlp`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.dlp import CloudDLPHook, DlpJob # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.dlp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_function_hook.py b/airflow/contrib/hooks/gcp_function_hook.py deleted file mode 100644 index dc6464fc07ce9..0000000000000 --- a/airflow/contrib/hooks/gcp_function_hook.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.functions`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.functions import CloudFunctionsHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.functions`.", - DeprecationWarning, - stacklevel=2, -) - - -class GcfHook(CloudFunctionsHook): - """ - This class is deprecated. Please use - `airflow.providers.google.cloud.hooks.functions.CloudFunctionsHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.google.cloud.hooks.functions.CloudFunctionsHook`.", - DeprecationWarning, - stacklevel=2, - ) - - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_kms_hook.py b/airflow/contrib/hooks/gcp_kms_hook.py deleted file mode 100644 index 1b409be99f121..0000000000000 --- a/airflow/contrib/hooks/gcp_kms_hook.py +++ /dev/null @@ -1,40 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.kms`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.kms import CloudKMSHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.kms`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudKMSHook(CloudKMSHook): - """This class is deprecated. Please use `airflow.providers.google.cloud.hooks.kms.CloudKMSHook`.""" - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use `airflow.providers.google.cloud.hooks.kms.CloudKMSHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_mlengine_hook.py b/airflow/contrib/hooks/gcp_mlengine_hook.py deleted file mode 100644 index 57978e008b375..0000000000000 --- a/airflow/contrib/hooks/gcp_mlengine_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.mlengine`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.mlengine import MLEngineHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.mlengine`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_natural_language_hook.py b/airflow/contrib/hooks/gcp_natural_language_hook.py deleted file mode 100644 index 86ee9f8675d57..0000000000000 --- a/airflow/contrib/hooks/gcp_natural_language_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.natural_language`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.natural_language import CloudNaturalLanguageHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.natural_language`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_pubsub_hook.py b/airflow/contrib/hooks/gcp_pubsub_hook.py deleted file mode 100644 index 677a0f03fa506..0000000000000 --- a/airflow/contrib/hooks/gcp_pubsub_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.pubsub`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.pubsub import PubSubException, PubSubHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.pubsub`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_spanner_hook.py b/airflow/contrib/hooks/gcp_spanner_hook.py deleted file mode 100644 index d3608ce5d0994..0000000000000 --- a/airflow/contrib/hooks/gcp_spanner_hook.py +++ /dev/null @@ -1,36 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.spanner`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.spanner import SpannerHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.spanner`.", - DeprecationWarning, - stacklevel=2, -) - - -class CloudSpannerHook(SpannerHook): - """This class is deprecated. Please use `airflow.providers.google.cloud.hooks.spanner.SpannerHook`.""" - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_speech_to_text_hook.py b/airflow/contrib/hooks/gcp_speech_to_text_hook.py deleted file mode 100644 index 1c4f4e16a79c0..0000000000000 --- a/airflow/contrib/hooks/gcp_speech_to_text_hook.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.speech_to_text`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.speech_to_text import CloudSpeechToTextHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.speech_to_text`", - DeprecationWarning, - stacklevel=2, -) - - -class GCPSpeechToTextHook(CloudSpeechToTextHook): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.hooks.speech_to_text.CloudSpeechToTextHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.google.cloud.hooks.speech_to_text.CloudSpeechToTextHook`.", - DeprecationWarning, - stacklevel=2, - ) - - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_sql_hook.py b/airflow/contrib/hooks/gcp_sql_hook.py deleted file mode 100644 index d3e85a7c3a57c..0000000000000 --- a/airflow/contrib/hooks/gcp_sql_hook.py +++ /dev/null @@ -1,47 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.cloud_sql`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.cloud_sql import CloudSQLDatabaseHook, CloudSQLHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.cloud_sql`", - DeprecationWarning, - stacklevel=2, -) - - -class CloudSqlDatabaseHook(CloudSQLDatabaseHook): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlHook(CloudSQLHook): - """This class is deprecated. Please use `airflow.providers.google.cloud.hooks.sql.CloudSQLHook`.""" - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_tasks_hook.py b/airflow/contrib/hooks/gcp_tasks_hook.py deleted file mode 100644 index 1753b2a1842d4..0000000000000 --- a/airflow/contrib/hooks/gcp_tasks_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.tasks`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.tasks import CloudTasksHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.tasks`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_text_to_speech_hook.py b/airflow/contrib/hooks/gcp_text_to_speech_hook.py deleted file mode 100644 index 9e53ec16f5f0e..0000000000000 --- a/airflow/contrib/hooks/gcp_text_to_speech_hook.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.text_to_speech`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.text_to_speech import CloudTextToSpeechHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.text_to_speech`", - DeprecationWarning, - stacklevel=2, -) - - -class GCPTextToSpeechHook(CloudTextToSpeechHook): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.hooks.text_to_speech.CloudTextToSpeechHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.google.cloud.hooks.text_to_speech.CloudTextToSpeechHook`.", - DeprecationWarning, - stacklevel=2, - ) - - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_transfer_hook.py b/airflow/contrib/hooks/gcp_transfer_hook.py deleted file mode 100644 index 57c098d52b7f9..0000000000000 --- a/airflow/contrib/hooks/gcp_transfer_hook.py +++ /dev/null @@ -1,50 +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. -""" -This module is deprecated. Please use -`airflow.providers.google.cloud.hooks.cloud_storage_transfer_service`. -""" - -import warnings - -from airflow.providers.google.cloud.hooks.cloud_storage_transfer_service import CloudDataTransferServiceHook - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.google.cloud.hooks.cloud_storage_transfer_service`", - DeprecationWarning, - stacklevel=2, -) - - -class GCPTransferServiceHook(CloudDataTransferServiceHook): - """ - This class is deprecated. Please use - `airflow.providers.google.cloud.hooks.cloud_storage_transfer_service.CloudDataTransferServiceHook`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.hooks.cloud_storage_transfer_service - .CloudDataTransferServiceHook`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gcp_translate_hook.py b/airflow/contrib/hooks/gcp_translate_hook.py deleted file mode 100644 index 1b0cec8b5ec9c..0000000000000 --- a/airflow/contrib/hooks/gcp_translate_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.translate`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.translate import CloudTranslateHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.translate`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_video_intelligence_hook.py b/airflow/contrib/hooks/gcp_video_intelligence_hook.py deleted file mode 100644 index a71ef4649e909..0000000000000 --- a/airflow/contrib/hooks/gcp_video_intelligence_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.video_intelligence`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.video_intelligence import CloudVideoIntelligenceHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.video_intelligence`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcp_vision_hook.py b/airflow/contrib/hooks/gcp_vision_hook.py deleted file mode 100644 index 52f47f42bfdf5..0000000000000 --- a/airflow/contrib/hooks/gcp_vision_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.vision`.""" - -import warnings - -from airflow.providers.google.cloud.hooks.vision import CloudVisionHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.vision`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/gcs_hook.py b/airflow/contrib/hooks/gcs_hook.py deleted file mode 100644 index 910206acf9286..0000000000000 --- a/airflow/contrib/hooks/gcs_hook.py +++ /dev/null @@ -1,39 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.gcs`.""" -import warnings - -from airflow.providers.google.cloud.hooks.gcs import GCSHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageHook(GCSHook): - """This class is deprecated. Please use `airflow.providers.google.cloud.hooks.gcs.GCSHook`.""" - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. Please use `airflow.providers.google.cloud.hooks.gcs.GCSHook`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/hooks/gdrive_hook.py b/airflow/contrib/hooks/gdrive_hook.py deleted file mode 100644 index dad8459c58394..0000000000000 --- a/airflow/contrib/hooks/gdrive_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.suite.hooks.drive`.""" - -import warnings - -from airflow.providers.google.suite.hooks.drive import GoogleDriveHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.suite.hooks.drive`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/grpc_hook.py b/airflow/contrib/hooks/grpc_hook.py deleted file mode 100644 index f7aa6e2216fa9..0000000000000 --- a/airflow/contrib/hooks/grpc_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.grpc.hooks.grpc`.""" - -import warnings - -from airflow.providers.grpc.hooks.grpc import GrpcHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.grpc.hooks.grpc`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/imap_hook.py b/airflow/contrib/hooks/imap_hook.py deleted file mode 100644 index 57703966ab3c9..0000000000000 --- a/airflow/contrib/hooks/imap_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.imap.hooks.imap`.""" - -import warnings - -from airflow.providers.imap.hooks.imap import ImapHook, Mail, MailPart # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.imap.hooks.imap`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/jenkins_hook.py b/airflow/contrib/hooks/jenkins_hook.py deleted file mode 100644 index 178474ea77991..0000000000000 --- a/airflow/contrib/hooks/jenkins_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.jenkins.hooks.jenkins`.""" - -import warnings - -from airflow.providers.jenkins.hooks.jenkins import JenkinsHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.jenkins.hooks.jenkins`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/jira_hook.py b/airflow/contrib/hooks/jira_hook.py deleted file mode 100644 index c0c530471f8e6..0000000000000 --- a/airflow/contrib/hooks/jira_hook.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.atlassian.jira.hooks.jira`.""" - -import warnings - -from airflow.providers.atlassian.jira.hooks.jira import JiraHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.atlassian.jira.hooks.jira`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/mongo_hook.py b/airflow/contrib/hooks/mongo_hook.py deleted file mode 100644 index 63f6eea36ba51..0000000000000 --- a/airflow/contrib/hooks/mongo_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.mongo.hooks.mongo`.""" - -import warnings - -from airflow.providers.mongo.hooks.mongo import MongoHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.mongo.hooks.mongo`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/openfaas_hook.py b/airflow/contrib/hooks/openfaas_hook.py deleted file mode 100644 index a0e71ffe5e564..0000000000000 --- a/airflow/contrib/hooks/openfaas_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.openfaas.hooks.openfaas`.""" - -import warnings - -from airflow.providers.openfaas.hooks.openfaas import OK_STATUS_CODE, OpenFaasHook, requests # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.openfaas.hooks.openfaas`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/opsgenie_alert_hook.py b/airflow/contrib/hooks/opsgenie_alert_hook.py deleted file mode 100644 index abd9c89e09308..0000000000000 --- a/airflow/contrib/hooks/opsgenie_alert_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.opsgenie.hooks.opsgenie`.""" - -import warnings - -from airflow.providers.opsgenie.hooks.opsgenie import OpsgenieAlertHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.opsgenie.hooks.opsgenie`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/pagerduty_hook.py b/airflow/contrib/hooks/pagerduty_hook.py deleted file mode 100644 index 33797b0e60ea4..0000000000000 --- a/airflow/contrib/hooks/pagerduty_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.pagerduty.hooks.pagerduty`.""" - -import warnings - -from airflow.providers.pagerduty.hooks.pagerduty import PagerdutyHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.pagerduty.hooks.pagerduty`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/pinot_hook.py b/airflow/contrib/hooks/pinot_hook.py deleted file mode 100644 index 159677fdec52a..0000000000000 --- a/airflow/contrib/hooks/pinot_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.pinot.hooks.pinot`.""" - -import warnings - -from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.pinot.hooks.pinot`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/qubole_check_hook.py b/airflow/contrib/hooks/qubole_check_hook.py deleted file mode 100644 index 0a674d7c763ad..0000000000000 --- a/airflow/contrib/hooks/qubole_check_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.qubole.hooks.qubole_check`.""" - -import warnings - -from airflow.providers.qubole.hooks.qubole_check import QuboleCheckHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.qubole.hooks.qubole_check`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/qubole_hook.py b/airflow/contrib/hooks/qubole_hook.py deleted file mode 100644 index 6a695bca76462..0000000000000 --- a/airflow/contrib/hooks/qubole_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.qubole.hooks.qubole`.""" - -import warnings - -from airflow.providers.qubole.hooks.qubole import QuboleHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.qubole.hooks.qubole`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/redis_hook.py b/airflow/contrib/hooks/redis_hook.py deleted file mode 100644 index 57bdab5aead08..0000000000000 --- a/airflow/contrib/hooks/redis_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.redis.hooks.redis`.""" - -import warnings - -from airflow.providers.redis.hooks.redis import RedisHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.redis.hooks.redis`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/redshift_hook.py b/airflow/contrib/hooks/redshift_hook.py deleted file mode 100644 index f33515f6cd954..0000000000000 --- a/airflow/contrib/hooks/redshift_hook.py +++ /dev/null @@ -1,31 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.redshift_cluster`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.redshift_cluster import RedshiftHook - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.redshift_cluster`.", - DeprecationWarning, - stacklevel=2, -) - -__all__ = ["RedshiftHook"] diff --git a/airflow/contrib/hooks/sagemaker_hook.py b/airflow/contrib/hooks/sagemaker_hook.py deleted file mode 100644 index 321f25b022fa9..0000000000000 --- a/airflow/contrib/hooks/sagemaker_hook.py +++ /dev/null @@ -1,35 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.sagemaker`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.sagemaker import ( # noqa - LogState, - Position, - SageMakerHook, - argmin, - secondary_training_status_changed, - secondary_training_status_message, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/salesforce_hook.py b/airflow/contrib/hooks/salesforce_hook.py deleted file mode 100644 index a707a527b8449..0000000000000 --- a/airflow/contrib/hooks/salesforce_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.salesforce.hooks.salesforce`.""" - -import warnings - -from airflow.providers.salesforce.hooks.salesforce import SalesforceHook, pd # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.salesforce.hooks.salesforce`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/segment_hook.py b/airflow/contrib/hooks/segment_hook.py deleted file mode 100644 index 6da62578cee8b..0000000000000 --- a/airflow/contrib/hooks/segment_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.segment.hooks.segment`.""" - -import warnings - -from airflow.providers.segment.hooks.segment import SegmentHook, analytics # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.segment.hooks.segment`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/sftp_hook.py b/airflow/contrib/hooks/sftp_hook.py deleted file mode 100644 index 0153e8e54d062..0000000000000 --- a/airflow/contrib/hooks/sftp_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.sftp.hooks.sftp`.""" - -import warnings - -from airflow.providers.sftp.hooks.sftp import SFTPHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.sftp.hooks.sftp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/slack_webhook_hook.py b/airflow/contrib/hooks/slack_webhook_hook.py deleted file mode 100644 index f438d11575b43..0000000000000 --- a/airflow/contrib/hooks/slack_webhook_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.slack.hooks.slack_webhook`.""" - -import warnings - -from airflow.providers.slack.hooks.slack_webhook import SlackWebhookHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.slack.hooks.slack_webhook`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/snowflake_hook.py b/airflow/contrib/hooks/snowflake_hook.py deleted file mode 100644 index 804baccf66cdf..0000000000000 --- a/airflow/contrib/hooks/snowflake_hook.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.snowflake.hooks.snowflake`.""" - -import warnings - -from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.snowflake.hooks.snowflake`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/spark_jdbc_hook.py b/airflow/contrib/hooks/spark_jdbc_hook.py deleted file mode 100644 index 1b48d094acbb6..0000000000000 --- a/airflow/contrib/hooks/spark_jdbc_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.hooks.spark_jdbc`.""" - -import warnings - -from airflow.providers.apache.spark.hooks.spark_jdbc import SparkJDBCHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.spark.hooks.spark_jdbc`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/spark_sql_hook.py b/airflow/contrib/hooks/spark_sql_hook.py deleted file mode 100644 index 6b262ed3efce5..0000000000000 --- a/airflow/contrib/hooks/spark_sql_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.hooks.spark_sql`.""" - -import warnings - -from airflow.providers.apache.spark.hooks.spark_sql import SparkSqlHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.spark.hooks.spark_sql`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/spark_submit_hook.py b/airflow/contrib/hooks/spark_submit_hook.py deleted file mode 100644 index fbdbf4f9f0d53..0000000000000 --- a/airflow/contrib/hooks/spark_submit_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.hooks.spark_submit`.""" - -import warnings - -from airflow.providers.apache.spark.hooks.spark_submit import SparkSubmitHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.spark.hooks.spark_submit`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/sqoop_hook.py b/airflow/contrib/hooks/sqoop_hook.py deleted file mode 100644 index f231c0f26a8dc..0000000000000 --- a/airflow/contrib/hooks/sqoop_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.sqoop.hooks.sqoop`.""" - -import warnings - -from airflow.providers.apache.sqoop.hooks.sqoop import SqoopHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.sqoop.hooks.sqoop`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/ssh_hook.py b/airflow/contrib/hooks/ssh_hook.py deleted file mode 100644 index ef3000d888c50..0000000000000 --- a/airflow/contrib/hooks/ssh_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.ssh.hooks.ssh`.""" - -import warnings - -from airflow.providers.ssh.hooks.ssh import SSHHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.ssh.hooks.ssh`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/vertica_hook.py b/airflow/contrib/hooks/vertica_hook.py deleted file mode 100644 index fc84b222d0a5a..0000000000000 --- a/airflow/contrib/hooks/vertica_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.vertica.hooks.vertica`.""" - -import warnings - -from airflow.providers.vertica.hooks.vertica import VerticaHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.vertica.hooks.vertica`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/wasb_hook.py b/airflow/contrib/hooks/wasb_hook.py deleted file mode 100644 index 3b5eb650934af..0000000000000 --- a/airflow/contrib/hooks/wasb_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.wasb`.""" - -import warnings - -from airflow.providers.microsoft.azure.hooks.wasb import WasbHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.wasb`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/hooks/winrm_hook.py b/airflow/contrib/hooks/winrm_hook.py deleted file mode 100644 index 35e7db2bc7294..0000000000000 --- a/airflow/contrib/hooks/winrm_hook.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.winrm.hooks.winrm`.""" - -import warnings - -from airflow.providers.microsoft.winrm.hooks.winrm import WinRMHook # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.winrm.hooks.winrm`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/__init__.py b/airflow/contrib/operators/__init__.py index 2041adb9ea24a..a316038dd7c37 100644 --- a/airflow/contrib/operators/__init__.py +++ b/airflow/contrib/operators/__init__.py @@ -17,3 +17,630 @@ # under the License. # """This package is deprecated. Please use `airflow.operators` or `airflow.providers.*.operators`.""" +import warnings + +from airflow.utils.deprecation_tools import add_deprecated_classes + +warnings.warn( + "This package is deprecated. Please use `airflow.operators` or `airflow.providers.*.operators`.", + DeprecationWarning, + stacklevel=2, +) + +__deprecated_classes = { + 'adls_list_operator': { + 'ADLSListOperator': 'airflow.providers.microsoft.azure.operators.adls.ADLSListOperator', + }, + 'adls_to_gcs': { + 'ADLSToGCSOperator': 'airflow.providers.google.cloud.transfers.adls_to_gcs.ADLSToGCSOperator', + }, + 'aws_athena_operator': { + 'AWSAthenaOperator': 'airflow.providers.amazon.aws.operators.athena.AthenaOperator', + }, + 'aws_sqs_publish_operator': { + 'SqsPublishOperator': 'airflow.providers.amazon.aws.operators.sqs.SqsPublishOperator', + }, + 'awsbatch_operator': { + 'BatchProtocol': 'airflow.providers.amazon.aws.hooks.batch_client.BatchProtocol', + 'BatchOperator': 'airflow.providers.amazon.aws.operators.batch.BatchOperator', + }, + 'azure_container_instances_operator': { + 'AzureContainerInstancesOperator': + 'airflow.providers.microsoft.azure.operators.container_instances.AzureContainerInstancesOperator', + }, + 'azure_cosmos_operator': { + 'AzureCosmosInsertDocumentOperator': + 'airflow.providers.microsoft.azure.operators.cosmos.AzureCosmosInsertDocumentOperator', + }, + 'bigquery_check_operator': { + 'BigQueryCheckOperator': 'airflow.providers.google.cloud.operators.bigquery.BigQueryCheckOperator', + 'BigQueryIntervalCheckOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryIntervalCheckOperator', + 'BigQueryValueCheckOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryValueCheckOperator', + }, + 'bigquery_get_data': { + 'BigQueryGetDataOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryGetDataOperator', + }, + 'bigquery_operator': { + 'BigQueryCreateEmptyDatasetOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryCreateEmptyDatasetOperator', + 'BigQueryCreateEmptyTableOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryCreateEmptyTableOperator', + 'BigQueryCreateExternalTableOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryCreateExternalTableOperator', + 'BigQueryDeleteDatasetOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryDeleteDatasetOperator', + 'BigQueryExecuteQueryOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryExecuteQueryOperator', + 'BigQueryGetDatasetOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryGetDatasetOperator', + 'BigQueryGetDatasetTablesOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryGetDatasetTablesOperator', + 'BigQueryPatchDatasetOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryPatchDatasetOperator', + 'BigQueryUpdateDatasetOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryUpdateDatasetOperator', + 'BigQueryUpsertTableOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryUpsertTableOperator', + }, + 'bigquery_table_delete_operator': { + 'BigQueryDeleteTableOperator': + 'airflow.providers.google.cloud.operators.bigquery.BigQueryDeleteTableOperator', + }, + 'bigquery_to_bigquery': { + 'BigQueryToBigQueryOperator': + 'airflow.providers.google.cloud.transfers.bigquery_to_bigquery.BigQueryToBigQueryOperator', + }, + 'bigquery_to_gcs': { + 'BigQueryToGCSOperator': + 'airflow.providers.google.cloud.transfers.bigquery_to_gcs.BigQueryToGCSOperator', + }, + 'bigquery_to_mysql_operator': { + 'BigQueryToMySqlOperator': + 'airflow.providers.google.cloud.transfers.bigquery_to_mysql.BigQueryToMySqlOperator', + }, + 'cassandra_to_gcs': { + 'CassandraToGCSOperator': + 'airflow.providers.google.cloud.transfers.cassandra_to_gcs.CassandraToGCSOperator', + }, + 'databricks_operator': { + 'DatabricksRunNowOperator': + 'airflow.providers.databricks.operators.databricks.DatabricksRunNowOperator', + 'DatabricksSubmitRunOperator': + 'airflow.providers.databricks.operators.databricks.DatabricksSubmitRunOperator', + }, + 'dataflow_operator': { + 'DataflowCreateJavaJobOperator': + 'airflow.providers.google.cloud.operators.dataflow.DataflowCreateJavaJobOperator', + 'DataflowCreatePythonJobOperator': + 'airflow.providers.google.cloud.operators.dataflow.DataflowCreatePythonJobOperator', + 'DataflowTemplatedJobStartOperator': + 'airflow.providers.google.cloud.operators.dataflow.DataflowTemplatedJobStartOperator', + }, + 'dataproc_operator': { + 'DataprocCreateClusterOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocCreateClusterOperator', + 'DataprocDeleteClusterOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocDeleteClusterOperator', + 'DataprocInstantiateInlineWorkflowTemplateOperator': + 'airflow.providers.google.cloud.operators.dataproc.' + 'DataprocInstantiateInlineWorkflowTemplateOperator', + 'DataprocInstantiateWorkflowTemplateOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocInstantiateWorkflowTemplateOperator', + 'DataprocJobBaseOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocJobBaseOperator', + 'DataprocScaleClusterOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocScaleClusterOperator', + 'DataprocSubmitHadoopJobOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHadoopJobOperator', + 'DataprocSubmitHiveJobOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHiveJobOperator', + 'DataprocSubmitPigJobOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPigJobOperator', + 'DataprocSubmitPySparkJobOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPySparkJobOperator', + 'DataprocSubmitSparkJobOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkJobOperator', + 'DataprocSubmitSparkSqlJobOperator': + 'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkSqlJobOperator', + }, + 'datastore_export_operator': { + 'CloudDatastoreExportEntitiesOperator': + 'airflow.providers.google.cloud.operators.datastore.CloudDatastoreExportEntitiesOperator', + }, + 'datastore_import_operator': { + 'CloudDatastoreImportEntitiesOperator': + 'airflow.providers.google.cloud.operators.datastore.CloudDatastoreImportEntitiesOperator', + }, + 'dingding_operator': { + 'DingdingOperator': 'airflow.providers.dingding.operators.dingding.DingdingOperator', + }, + 'discord_webhook_operator': { + 'DiscordWebhookOperator': + 'airflow.providers.discord.operators.discord_webhook.DiscordWebhookOperator', + }, + 'docker_swarm_operator': { + 'DockerSwarmOperator': 'airflow.providers.docker.operators.docker_swarm.DockerSwarmOperator', + }, + 'druid_operator': { + 'DruidOperator': 'airflow.providers.apache.druid.operators.druid.DruidOperator', + }, + 'dynamodb_to_s3': { + 'DynamoDBToS3Operator': 'airflow.providers.amazon.aws.transfers.dynamodb_to_s3.DynamoDBToS3Operator', + }, + 'ecs_operator': { + 'EcsProtocol': 'airflow.providers.amazon.aws.hooks.ecs.EcsProtocol', + 'EcsRunTaskOperator': 'airflow.providers.amazon.aws.operators.ecs.EcsRunTaskOperator', + }, + 'file_to_gcs': { + 'LocalFilesystemToGCSOperator': + 'airflow.providers.google.cloud.transfers.local_to_gcs.LocalFilesystemToGCSOperator', + }, + 'file_to_wasb': { + 'LocalFilesystemToWasbOperator': + 'airflow.providers.microsoft.azure.transfers.local_to_wasb.LocalFilesystemToWasbOperator', + }, + 'gcp_bigtable_operator': { + 'BigtableCreateInstanceOperator': + 'airflow.providers.google.cloud.operators.bigtable.BigtableCreateInstanceOperator', + 'BigtableCreateTableOperator': + 'airflow.providers.google.cloud.operators.bigtable.BigtableCreateTableOperator', + 'BigtableDeleteInstanceOperator': + 'airflow.providers.google.cloud.operators.bigtable.BigtableDeleteInstanceOperator', + 'BigtableDeleteTableOperator': + 'airflow.providers.google.cloud.operators.bigtable.BigtableDeleteTableOperator', + 'BigtableUpdateClusterOperator': + 'airflow.providers.google.cloud.operators.bigtable.BigtableUpdateClusterOperator', + 'BigtableTableReplicationCompletedSensor': + 'airflow.providers.google.cloud.sensors.bigtable.BigtableTableReplicationCompletedSensor', + }, + 'gcp_cloud_build_operator': { + 'CloudBuildCreateBuildOperator': + 'airflow.providers.google.cloud.operators.cloud_build.CloudBuildCreateBuildOperator', + }, + 'gcp_compute_operator': { + 'ComputeEngineBaseOperator': + 'airflow.providers.google.cloud.operators.compute.ComputeEngineBaseOperator', + 'ComputeEngineCopyInstanceTemplateOperator': + 'airflow.providers.google.cloud.operators.compute.ComputeEngineCopyInstanceTemplateOperator', + 'ComputeEngineInstanceGroupUpdateManagerTemplateOperator': + 'airflow.providers.google.cloud.operators.compute.' + 'ComputeEngineInstanceGroupUpdateManagerTemplateOperator', + 'ComputeEngineSetMachineTypeOperator': + 'airflow.providers.google.cloud.operators.compute.ComputeEngineSetMachineTypeOperator', + 'ComputeEngineStartInstanceOperator': + 'airflow.providers.google.cloud.operators.compute.ComputeEngineStartInstanceOperator', + 'ComputeEngineStopInstanceOperator': + 'airflow.providers.google.cloud.operators.compute.ComputeEngineStopInstanceOperator', + }, + 'gcp_container_operator': { + 'GKECreateClusterOperator': + 'airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator', + 'GKEDeleteClusterOperator': + 'airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator', + 'GKEStartPodOperator': + 'airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator', + }, + 'gcp_dlp_operator': { + 'CloudDLPCancelDLPJobOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPCancelDLPJobOperator', + 'CloudDLPCreateDeidentifyTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPCreateDeidentifyTemplateOperator', + 'CloudDLPCreateDLPJobOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPCreateDLPJobOperator', + 'CloudDLPCreateInspectTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPCreateInspectTemplateOperator', + 'CloudDLPCreateJobTriggerOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPCreateJobTriggerOperator', + 'CloudDLPCreateStoredInfoTypeOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPCreateStoredInfoTypeOperator', + 'CloudDLPDeidentifyContentOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPDeidentifyContentOperator', + 'CloudDLPDeleteDeidentifyTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDeidentifyTemplateOperator', + 'CloudDLPDeleteDLPJobOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDLPJobOperator', + 'CloudDLPDeleteInspectTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteInspectTemplateOperator', + 'CloudDLPDeleteJobTriggerOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteJobTriggerOperator', + 'CloudDLPDeleteStoredInfoTypeOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteStoredInfoTypeOperator', + 'CloudDLPGetDeidentifyTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPGetDeidentifyTemplateOperator', + 'CloudDLPGetDLPJobOperator': 'airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobOperator', + 'CloudDLPGetDLPJobTriggerOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobTriggerOperator', + 'CloudDLPGetInspectTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPGetInspectTemplateOperator', + 'CloudDLPGetStoredInfoTypeOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPGetStoredInfoTypeOperator', + 'CloudDLPInspectContentOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPInspectContentOperator', + 'CloudDLPListDeidentifyTemplatesOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPListDeidentifyTemplatesOperator', + 'CloudDLPListDLPJobsOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPListDLPJobsOperator', + 'CloudDLPListInfoTypesOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPListInfoTypesOperator', + 'CloudDLPListInspectTemplatesOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPListInspectTemplatesOperator', + 'CloudDLPListJobTriggersOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPListJobTriggersOperator', + 'CloudDLPListStoredInfoTypesOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPListStoredInfoTypesOperator', + 'CloudDLPRedactImageOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPRedactImageOperator', + 'CloudDLPReidentifyContentOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPReidentifyContentOperator', + 'CloudDLPUpdateDeidentifyTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateDeidentifyTemplateOperator', + 'CloudDLPUpdateInspectTemplateOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateInspectTemplateOperator', + 'CloudDLPUpdateJobTriggerOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateJobTriggerOperator', + 'CloudDLPUpdateStoredInfoTypeOperator': + 'airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateStoredInfoTypeOperator', + }, + 'gcp_function_operator': { + 'CloudFunctionDeleteFunctionOperator': + 'airflow.providers.google.cloud.operators.functions.CloudFunctionDeleteFunctionOperator', + 'CloudFunctionDeployFunctionOperator': + 'airflow.providers.google.cloud.operators.functions.CloudFunctionDeployFunctionOperator', + }, + 'gcp_natural_language_operator': { + 'CloudNaturalLanguageAnalyzeEntitiesOperator': + 'airflow.providers.google.cloud.operators.natural_language.' + 'CloudNaturalLanguageAnalyzeEntitiesOperator', + 'CloudNaturalLanguageAnalyzeEntitySentimentOperator': + 'airflow.providers.google.cloud.operators.natural_language.' + 'CloudNaturalLanguageAnalyzeEntitySentimentOperator', + 'CloudNaturalLanguageAnalyzeSentimentOperator': + 'airflow.providers.google.cloud.operators.natural_language.' + 'CloudNaturalLanguageAnalyzeSentimentOperator', + 'CloudNaturalLanguageClassifyTextOperator': + 'airflow.providers.google.cloud.operators.natural_language.' + 'CloudNaturalLanguageClassifyTextOperator', + }, + 'gcp_spanner_operator': { + 'SpannerDeleteDatabaseInstanceOperator': + 'airflow.providers.google.cloud.operators.spanner.SpannerDeleteDatabaseInstanceOperator', + 'SpannerDeleteInstanceOperator': + 'airflow.providers.google.cloud.operators.spanner.SpannerDeleteInstanceOperator', + 'SpannerDeployDatabaseInstanceOperator': + 'airflow.providers.google.cloud.operators.spanner.SpannerDeployDatabaseInstanceOperator', + 'SpannerDeployInstanceOperator': + 'airflow.providers.google.cloud.operators.spanner.SpannerDeployInstanceOperator', + 'SpannerQueryDatabaseInstanceOperator': + 'airflow.providers.google.cloud.operators.spanner.SpannerQueryDatabaseInstanceOperator', + 'SpannerUpdateDatabaseInstanceOperator': + 'airflow.providers.google.cloud.operators.spanner.SpannerUpdateDatabaseInstanceOperator', + }, + 'gcp_speech_to_text_operator': { + 'CloudSpeechToTextRecognizeSpeechOperator': + 'airflow.providers.google.cloud.operators.speech_to_text.' + 'CloudSpeechToTextRecognizeSpeechOperator', + }, + 'gcp_sql_operator': { + 'CloudSQLBaseOperator': 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLBaseOperator', + 'CloudSQLCreateInstanceDatabaseOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLCreateInstanceDatabaseOperator', + 'CloudSQLCreateInstanceOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLCreateInstanceOperator', + 'CloudSQLDeleteInstanceDatabaseOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLDeleteInstanceDatabaseOperator', + 'CloudSQLDeleteInstanceOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLDeleteInstanceOperator', + 'CloudSQLExecuteQueryOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLExecuteQueryOperator', + 'CloudSQLExportInstanceOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLExportInstanceOperator', + 'CloudSQLImportInstanceOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLImportInstanceOperator', + 'CloudSQLInstancePatchOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLInstancePatchOperator', + 'CloudSQLPatchInstanceDatabaseOperator': + 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLPatchInstanceDatabaseOperator', + }, + 'gcp_tasks_operator': { + 'CloudTasksQueueCreateOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueueCreateOperator', + 'CloudTasksQueueDeleteOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueueDeleteOperator', + 'CloudTasksQueueGetOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueueGetOperator', + 'CloudTasksQueuePauseOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueuePauseOperator', + 'CloudTasksQueuePurgeOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueuePurgeOperator', + 'CloudTasksQueueResumeOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueueResumeOperator', + 'CloudTasksQueuesListOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueuesListOperator', + 'CloudTasksQueueUpdateOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksQueueUpdateOperator', + 'CloudTasksTaskCreateOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksTaskCreateOperator', + 'CloudTasksTaskDeleteOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksTaskDeleteOperator', + 'CloudTasksTaskGetOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksTaskGetOperator', + 'CloudTasksTaskRunOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksTaskRunOperator', + 'CloudTasksTasksListOperator': + 'airflow.providers.google.cloud.operators.tasks.CloudTasksTasksListOperator', + }, + 'gcp_text_to_speech_operator': { + 'CloudTextToSpeechSynthesizeOperator': + 'airflow.providers.google.cloud.operators.text_to_speech.CloudTextToSpeechSynthesizeOperator', + }, + 'gcp_transfer_operator': { + 'CloudDataTransferServiceCancelOperationOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceCancelOperationOperator', + 'CloudDataTransferServiceCreateJobOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceCreateJobOperator', + 'CloudDataTransferServiceDeleteJobOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceDeleteJobOperator', + 'CloudDataTransferServiceGCSToGCSOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceGCSToGCSOperator', + 'CloudDataTransferServiceGetOperationOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceGetOperationOperator', + 'CloudDataTransferServiceListOperationsOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceListOperationsOperator', + 'CloudDataTransferServicePauseOperationOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServicePauseOperationOperator', + 'CloudDataTransferServiceResumeOperationOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceResumeOperationOperator', + 'CloudDataTransferServiceS3ToGCSOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceS3ToGCSOperator', + 'CloudDataTransferServiceUpdateJobOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceUpdateJobOperator', + }, + 'gcp_translate_operator': { + 'CloudTranslateTextOperator': + 'airflow.providers.google.cloud.operators.translate.CloudTranslateTextOperator', + }, + 'gcp_translate_speech_operator': { + 'CloudTranslateSpeechOperator': + 'airflow.providers.google.cloud.operators.translate_speech.CloudTranslateSpeechOperator', + }, + 'gcp_video_intelligence_operator': { + 'CloudVideoIntelligenceDetectVideoExplicitContentOperator': + 'airflow.providers.google.cloud.operators.video_intelligence.' + 'CloudVideoIntelligenceDetectVideoExplicitContentOperator', + 'CloudVideoIntelligenceDetectVideoLabelsOperator': + 'airflow.providers.google.cloud.operators.video_intelligence.' + 'CloudVideoIntelligenceDetectVideoLabelsOperator', + 'CloudVideoIntelligenceDetectVideoShotsOperator': + 'airflow.providers.google.cloud.operators.video_intelligence.' + 'CloudVideoIntelligenceDetectVideoShotsOperator', + }, + 'gcp_vision_operator': { + 'CloudVisionAddProductToProductSetOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionAddProductToProductSetOperator', + 'CloudVisionCreateProductOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductOperator', + 'CloudVisionCreateProductSetOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductSetOperator', + 'CloudVisionCreateReferenceImageOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionCreateReferenceImageOperator', + 'CloudVisionDeleteProductOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductOperator', + 'CloudVisionDeleteProductSetOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductSetOperator', + 'CloudVisionDetectImageLabelsOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionDetectImageLabelsOperator', + 'CloudVisionDetectImageSafeSearchOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionDetectImageSafeSearchOperator', + 'CloudVisionDetectTextOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionDetectTextOperator', + 'CloudVisionGetProductOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionGetProductOperator', + 'CloudVisionGetProductSetOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionGetProductSetOperator', + 'CloudVisionImageAnnotateOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionImageAnnotateOperator', + 'CloudVisionRemoveProductFromProductSetOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionRemoveProductFromProductSetOperator', + 'CloudVisionTextDetectOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionTextDetectOperator', + 'CloudVisionUpdateProductOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductOperator', + 'CloudVisionUpdateProductSetOperator': + 'airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductSetOperator', + }, + 'gcs_acl_operator': { + 'GCSBucketCreateAclEntryOperator': + 'airflow.providers.google.cloud.operators.gcs.GCSBucketCreateAclEntryOperator', + 'GCSObjectCreateAclEntryOperator': + 'airflow.providers.google.cloud.operators.gcs.GCSObjectCreateAclEntryOperator', + }, + 'gcs_delete_operator': { + 'GCSDeleteObjectsOperator': 'airflow.providers.google.cloud.operators.gcs.GCSDeleteObjectsOperator', + }, + 'gcs_download_operator': { + 'GCSToLocalFilesystemOperator': + 'airflow.providers.google.cloud.transfers.gcs_to_local.GCSToLocalFilesystemOperator', + }, + 'gcs_list_operator': { + 'GCSListObjectsOperator': 'airflow.providers.google.cloud.operators.gcs.GCSListObjectsOperator', + }, + 'gcs_operator': { + 'GCSCreateBucketOperator': 'airflow.providers.google.cloud.operators.gcs.GCSCreateBucketOperator', + }, + 'gcs_to_bq': { + 'GCSToBigQueryOperator': + 'airflow.providers.google.cloud.transfers.gcs_to_bigquery.GCSToBigQueryOperator', + }, + 'gcs_to_gcs': { + 'GCSToGCSOperator': 'airflow.providers.google.cloud.transfers.gcs_to_gcs.GCSToGCSOperator', + }, + 'gcs_to_gdrive_operator': { + 'GCSToGoogleDriveOperator': + 'airflow.providers.google.suite.transfers.gcs_to_gdrive.GCSToGoogleDriveOperator', + }, + 'gcs_to_s3': { + 'GCSToS3Operator': 'airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Operator', + }, + 'grpc_operator': { + 'GrpcOperator': 'airflow.providers.grpc.operators.grpc.GrpcOperator', + }, + 'hive_to_dynamodb': { + 'HiveToDynamoDBOperator': + 'airflow.providers.amazon.aws.transfers.hive_to_dynamodb.HiveToDynamoDBOperator', + }, + 'imap_attachment_to_s3_operator': { + 'ImapAttachmentToS3Operator': + 'airflow.providers.amazon.aws.transfers.imap_attachment_to_s3.ImapAttachmentToS3Operator', + }, + 'jenkins_job_trigger_operator': { + 'JenkinsJobTriggerOperator': + 'airflow.providers.jenkins.operators.jenkins_job_trigger.JenkinsJobTriggerOperator', + }, + 'jira_operator': { + 'JiraOperator': 'airflow.providers.atlassian.jira.operators.jira.JiraOperator', + }, + 'kubernetes_pod_operator': { + 'KubernetesPodOperator': + 'airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator', + }, + 'mlengine_operator': { + 'MLEngineManageModelOperator': + 'airflow.providers.google.cloud.operators.mlengine.MLEngineManageModelOperator', + 'MLEngineManageVersionOperator': + 'airflow.providers.google.cloud.operators.mlengine.MLEngineManageVersionOperator', + 'MLEngineStartBatchPredictionJobOperator': + 'airflow.providers.google.cloud.operators.mlengine.MLEngineStartBatchPredictionJobOperator', + 'MLEngineStartTrainingJobOperator': + 'airflow.providers.google.cloud.operators.mlengine.MLEngineStartTrainingJobOperator', + }, + 'mongo_to_s3': { + 'MongoToS3Operator': 'airflow.providers.amazon.aws.transfers.mongo_to_s3.MongoToS3Operator', + }, + 'mssql_to_gcs': { + 'MSSQLToGCSOperator': 'airflow.providers.google.cloud.transfers.mssql_to_gcs.MSSQLToGCSOperator', + }, + 'mysql_to_gcs': { + 'MySQLToGCSOperator': 'airflow.providers.google.cloud.transfers.mysql_to_gcs.MySQLToGCSOperator', + }, + 'opsgenie_alert_operator': { + 'OpsgenieCreateAlertOperator': + 'airflow.providers.opsgenie.operators.opsgenie.OpsgenieCreateAlertOperator', + }, + 'oracle_to_azure_data_lake_transfer': { + 'OracleToAzureDataLakeOperator': + 'airflow.providers.microsoft.azure.transfers.oracle_to_azure_data_lake.' + 'OracleToAzureDataLakeOperator', + }, + 'oracle_to_oracle_transfer': { + 'OracleToOracleOperator': + 'airflow.providers.oracle.transfers.oracle_to_oracle.OracleToOracleOperator', + }, + 'postgres_to_gcs_operator': { + 'PostgresToGCSOperator': + 'airflow.providers.google.cloud.transfers.postgres_to_gcs.PostgresToGCSOperator', + }, + 'pubsub_operator': { + 'PubSubCreateSubscriptionOperator': + 'airflow.providers.google.cloud.operators.pubsub.PubSubCreateSubscriptionOperator', + 'PubSubCreateTopicOperator': + 'airflow.providers.google.cloud.operators.pubsub.PubSubCreateTopicOperator', + 'PubSubDeleteSubscriptionOperator': + 'airflow.providers.google.cloud.operators.pubsub.PubSubDeleteSubscriptionOperator', + 'PubSubDeleteTopicOperator': + 'airflow.providers.google.cloud.operators.pubsub.PubSubDeleteTopicOperator', + 'PubSubPublishMessageOperator': + 'airflow.providers.google.cloud.operators.pubsub.PubSubPublishMessageOperator', + }, + 'qubole_check_operator': { + 'QuboleCheckOperator': 'airflow.providers.qubole.operators.qubole_check.QuboleCheckOperator', + 'QuboleValueCheckOperator': + 'airflow.providers.qubole.operators.qubole_check.QuboleValueCheckOperator', + }, + 'qubole_operator': { + 'QuboleOperator': 'airflow.providers.qubole.operators.qubole.QuboleOperator', + }, + 'redis_publish_operator': { + 'RedisPublishOperator': 'airflow.providers.redis.operators.redis_publish.RedisPublishOperator', + }, + 's3_to_gcs_operator': { + 'S3ToGCSOperator': 'airflow.providers.google.cloud.transfers.s3_to_gcs.S3ToGCSOperator', + }, + 's3_to_gcs_transfer_operator': { + 'CloudDataTransferServiceS3ToGCSOperator': + 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service.' + 'CloudDataTransferServiceS3ToGCSOperator', + }, + 's3_to_sftp_operator': { + 'S3ToSFTPOperator': 'airflow.providers.amazon.aws.transfers.s3_to_sftp.S3ToSFTPOperator', + }, + 'segment_track_event_operator': { + 'SegmentTrackEventOperator': + 'airflow.providers.segment.operators.segment_track_event.SegmentTrackEventOperator', + }, + 'sftp_operator': { + 'SFTPOperator': 'airflow.providers.sftp.operators.sftp.SFTPOperator', + }, + 'sftp_to_s3_operator': { + 'SFTPToS3Operator': 'airflow.providers.amazon.aws.transfers.sftp_to_s3.SFTPToS3Operator', + }, + 'slack_webhook_operator': { + 'SlackWebhookOperator': 'airflow.providers.slack.operators.slack_webhook.SlackWebhookOperator', + }, + 'snowflake_operator': { + 'SnowflakeOperator': 'airflow.providers.snowflake.operators.snowflake.SnowflakeOperator', + }, + 'sns_publish_operator': { + 'SnsPublishOperator': 'airflow.providers.amazon.aws.operators.sns.SnsPublishOperator', + }, + 'spark_jdbc_operator': { + 'SparkJDBCOperator': 'airflow.providers.apache.spark.operators.spark_jdbc.SparkJDBCOperator', + 'SparkSubmitOperator': 'airflow.providers.apache.spark.operators.spark_jdbc.SparkSubmitOperator', + }, + 'spark_sql_operator': { + 'SparkSqlOperator': 'airflow.providers.apache.spark.operators.spark_sql.SparkSqlOperator', + }, + 'spark_submit_operator': { + 'SparkSubmitOperator': 'airflow.providers.apache.spark.operators.spark_submit.SparkSubmitOperator', + }, + 'sql_to_gcs': { + 'BaseSQLToGCSOperator': 'airflow.providers.google.cloud.transfers.sql_to_gcs.BaseSQLToGCSOperator', + }, + 'sqoop_operator': { + 'SqoopOperator': 'airflow.providers.apache.sqoop.operators.sqoop.SqoopOperator', + }, + 'ssh_operator': { + 'SSHOperator': 'airflow.providers.ssh.operators.ssh.SSHOperator', + }, + 'vertica_operator': { + 'VerticaOperator': 'airflow.providers.vertica.operators.vertica.VerticaOperator', + }, + 'vertica_to_hive': { + 'VerticaToHiveOperator': + 'airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaToHiveOperator', + }, + 'vertica_to_mysql': { + 'VerticaToMySqlOperator': 'airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator', + }, + 'wasb_delete_blob_operator': { + 'WasbDeleteBlobOperator': + 'airflow.providers.microsoft.azure.operators.wasb_delete_blob.WasbDeleteBlobOperator', + }, + 'winrm_operator': { + 'WinRMOperator': 'airflow.providers.microsoft.winrm.operators.winrm.WinRMOperator', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/operators/adls_list_operator.py b/airflow/contrib/operators/adls_list_operator.py deleted file mode 100644 index d4d1394f89fe0..0000000000000 --- a/airflow/contrib/operators/adls_list_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.operators.adls`.""" - -import warnings - -from airflow.providers.microsoft.azure.operators.adls import ADLSListOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.operators.adls`.", - DeprecationWarning, - stacklevel=2, -) - - -class AzureDataLakeStorageListOperator(ADLSListOperator): - """ - This class is deprecated. - Please use Please use :mod:`airflow.providers.microsoft.azure.operators.adls.ADLSListOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use Please use :mod:`airflow.providers.microsoft.azure.operators.adls.ADLSListOperator`""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/adls_to_gcs.py b/airflow/contrib/operators/adls_to_gcs.py deleted file mode 100644 index 0497d4c259023..0000000000000 --- a/airflow/contrib/operators/adls_to_gcs.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.adls_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.adls_to_gcs import ADLSToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.adls_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class AdlsToGoogleCloudStorageOperator(ADLSToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.adls_to_gcs.ADLSToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.adls_to_gcs.ADLSToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/aws_athena_operator.py b/airflow/contrib/operators/aws_athena_operator.py deleted file mode 100644 index 14d8a5c2539ad..0000000000000 --- a/airflow/contrib/operators/aws_athena_operator.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.athena`.""" - -import warnings - -from airflow.providers.amazon.aws.operators.athena import AthenaOperator as AWSAthenaOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.athena`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/aws_sqs_publish_operator.py b/airflow/contrib/operators/aws_sqs_publish_operator.py deleted file mode 100644 index 0ecc8a64f359d..0000000000000 --- a/airflow/contrib/operators/aws_sqs_publish_operator.py +++ /dev/null @@ -1,44 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sqs`.""" - -import warnings - -from airflow.providers.amazon.aws.operators.sqs import SqsPublishOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sqs`.", - DeprecationWarning, - stacklevel=2, -) - - -class SQSPublishOperator(SqsPublishOperator): - """ - This class is deprecated. - Please use :class:`airflow.providers.amazon.aws.operators.sqs.SqsPublishOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.amazon.aws.operators.sqs.SqsPublishOperator`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/awsbatch_operator.py b/airflow/contrib/operators/awsbatch_operator.py deleted file mode 100644 index a89e56cba8fb2..0000000000000 --- a/airflow/contrib/operators/awsbatch_operator.py +++ /dev/null @@ -1,56 +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. -# - -""" -This module is deprecated. Please use: - -- :mod:`airflow.providers.amazon.aws.operators.batch` -- :mod:`airflow.providers.amazon.aws.hooks.batch_client` -- :mod:`airflow.providers.amazon.aws.hooks.batch_waiters`` -""" - -import warnings - -from airflow.providers.amazon.aws.hooks.batch_client import BatchProtocol # noqa -from airflow.providers.amazon.aws.operators.batch import BatchOperator - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.amazon.aws.operators.batch`, " - "`airflow.providers.amazon.aws.hooks.batch_client`, and " - "`airflow.providers.amazon.aws.hooks.batch_waiters`", - DeprecationWarning, - stacklevel=2, -) - - -class AWSBatchOperator(BatchOperator): - """ - This class is deprecated. Please use - `airflow.providers.amazon.aws.operators.batch.BatchOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.amazon.aws.operators.batch.BatchOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/azure_container_instances_operator.py b/airflow/contrib/operators/azure_container_instances_operator.py deleted file mode 100644 index d084748ca06df..0000000000000 --- a/airflow/contrib/operators/azure_container_instances_operator.py +++ /dev/null @@ -1,33 +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. -""" -This module is deprecated. Please use -`airflow.providers.microsoft.azure.operators.container_instances`. -""" -import warnings - -from airflow.providers.microsoft.azure.operators.container_instances import ( # noqa - AzureContainerInstancesOperator, -) - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.microsoft.azure.operators.container_instances`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/azure_cosmos_operator.py b/airflow/contrib/operators/azure_cosmos_operator.py deleted file mode 100644 index 269c8357c02d3..0000000000000 --- a/airflow/contrib/operators/azure_cosmos_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.operators.cosmos`.""" - -import warnings - -from airflow.providers.microsoft.azure.operators.cosmos import AzureCosmosInsertDocumentOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.operators.cosmos`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/bigquery_check_operator.py b/airflow/contrib/operators/bigquery_check_operator.py deleted file mode 100644 index 39b658cacab8d..0000000000000 --- a/airflow/contrib/operators/bigquery_check_operator.py +++ /dev/null @@ -1,32 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.operators.bigquery import ( # noqa - BigQueryCheckOperator, - BigQueryIntervalCheckOperator, - BigQueryValueCheckOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/bigquery_get_data.py b/airflow/contrib/operators/bigquery_get_data.py deleted file mode 100644 index 00c8575df3d70..0000000000000 --- a/airflow/contrib/operators/bigquery_get_data.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.operators.bigquery import BigQueryGetDataOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/bigquery_operator.py b/airflow/contrib/operators/bigquery_operator.py deleted file mode 100644 index 6fe8f0816263f..0000000000000 --- a/airflow/contrib/operators/bigquery_operator.py +++ /dev/null @@ -1,55 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.operators.bigquery import ( # noqa; noqa; noqa; noqa; noqa - BigQueryCreateEmptyDatasetOperator, - BigQueryCreateEmptyTableOperator, - BigQueryCreateExternalTableOperator, - BigQueryDeleteDatasetOperator, - BigQueryExecuteQueryOperator, - BigQueryGetDatasetOperator, - BigQueryGetDatasetTablesOperator, - BigQueryPatchDatasetOperator, - BigQueryUpdateDatasetOperator, - BigQueryUpsertTableOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`.", - DeprecationWarning, - stacklevel=2, -) - - -class BigQueryOperator(BigQueryExecuteQueryOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigquery.BigQueryExecuteQueryOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigquery.BigQueryExecuteQueryOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/bigquery_table_delete_operator.py b/airflow/contrib/operators/bigquery_table_delete_operator.py deleted file mode 100644 index 13822a1844409..0000000000000 --- a/airflow/contrib/operators/bigquery_table_delete_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.operators.bigquery import BigQueryDeleteTableOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`.", - DeprecationWarning, - stacklevel=2, -) - - -class BigQueryTableDeleteOperator(BigQueryDeleteTableOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigquery.BigQueryDeleteTableOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigquery.BigQueryDeleteTableOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/bigquery_to_bigquery.py b/airflow/contrib/operators/bigquery_to_bigquery.py deleted file mode 100644 index 84c26fb718c91..0000000000000 --- a/airflow/contrib/operators/bigquery_to_bigquery.py +++ /dev/null @@ -1,31 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.transfers.bigquery_to_bigquery`. -""" - -import warnings - -from airflow.providers.google.cloud.transfers.bigquery_to_bigquery import BigQueryToBigQueryOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.bigquery_to_bigquery`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/bigquery_to_gcs.py b/airflow/contrib/operators/bigquery_to_gcs.py deleted file mode 100644 index 702171187e885..0000000000000 --- a/airflow/contrib/operators/bigquery_to_gcs.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.bigquery_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.bigquery_to_gcs import BigQueryToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.bigquery_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class BigQueryToCloudStorageOperator(BigQueryToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.bigquery_to_gcs.BigQueryToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.bigquery_to_gcs.BigQueryToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/bigquery_to_mysql_operator.py b/airflow/contrib/operators/bigquery_to_mysql_operator.py deleted file mode 100644 index 401921cff502b..0000000000000 --- a/airflow/contrib/operators/bigquery_to_mysql_operator.py +++ /dev/null @@ -1,30 +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. -"""This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.transfers.bigquery_to_mysql`. -""" - -import warnings - -from airflow.providers.google.cloud.transfers.bigquery_to_mysql import BigQueryToMySqlOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.bigquery_to_mysql`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/cassandra_to_gcs.py b/airflow/contrib/operators/cassandra_to_gcs.py deleted file mode 100644 index bb4b244f0d4cf..0000000000000 --- a/airflow/contrib/operators/cassandra_to_gcs.py +++ /dev/null @@ -1,47 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.transfers.cassandra_to_gcs`. -""" - -import warnings - -from airflow.providers.google.cloud.transfers.cassandra_to_gcs import CassandraToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.cassandra_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class CassandraToGoogleCloudStorageOperator(CassandraToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.cassandra_to_gcs.CassandraToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.cassandra_to_gcs.CassandraToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/databricks_operator.py b/airflow/contrib/operators/databricks_operator.py deleted file mode 100644 index b591dd63b8274..0000000000000 --- a/airflow/contrib/operators/databricks_operator.py +++ /dev/null @@ -1,31 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.databricks.operators.databricks`.""" - -import warnings - -from airflow.providers.databricks.operators.databricks import ( # noqa - DatabricksRunNowOperator, - DatabricksSubmitRunOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.databricks.operators.databricks`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/dataflow_operator.py b/airflow/contrib/operators/dataflow_operator.py deleted file mode 100644 index d2e445add02f1..0000000000000 --- a/airflow/contrib/operators/dataflow_operator.py +++ /dev/null @@ -1,82 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.dataflow`.""" - -import warnings - -from airflow.providers.google.cloud.operators.dataflow import ( - DataflowCreateJavaJobOperator, - DataflowCreatePythonJobOperator, - DataflowTemplatedJobStartOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.dataflow`.", - DeprecationWarning, - stacklevel=2, -) - - -class DataFlowJavaOperator(DataflowCreateJavaJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataflow.DataflowCreateJavaJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataflow.DataflowCreateJavaJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataFlowPythonOperator(DataflowCreatePythonJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataflow.DataflowCreatePythonJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataflow.DataflowCreatePythonJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataflowTemplateOperator(DataflowTemplatedJobStartOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataflow.DataflowTemplatedJobStartOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataflow.DataflowTemplatedJobStartOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/dataproc_operator.py b/airflow/contrib/operators/dataproc_operator.py deleted file mode 100644 index b655ce630142a..0000000000000 --- a/airflow/contrib/operators/dataproc_operator.py +++ /dev/null @@ -1,244 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.dataproc`.""" - -import warnings - -from airflow.providers.google.cloud.operators.dataproc import ( - DataprocCreateClusterOperator, - DataprocDeleteClusterOperator, - DataprocInstantiateInlineWorkflowTemplateOperator, - DataprocInstantiateWorkflowTemplateOperator, - DataprocJobBaseOperator, - DataprocScaleClusterOperator, - DataprocSubmitHadoopJobOperator, - DataprocSubmitHiveJobOperator, - DataprocSubmitPigJobOperator, - DataprocSubmitPySparkJobOperator, - DataprocSubmitSparkJobOperator, - DataprocSubmitSparkSqlJobOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.dataproc`.", - DeprecationWarning, - stacklevel=2, -) - - -class DataprocClusterCreateOperator(DataprocCreateClusterOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocCreateClusterOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocCreateClusterOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataprocClusterDeleteOperator(DataprocDeleteClusterOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocDeleteClusterOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocDeleteClusterOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataprocClusterScaleOperator(DataprocScaleClusterOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocScaleClusterOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocScaleClusterOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcHadoopOperator(DataprocSubmitHadoopJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHadoopJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHadoopJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcHiveOperator(DataprocSubmitHiveJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHiveJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHiveJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcJobBaseOperator(DataprocJobBaseOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocJobBaseOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocJobBaseOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcPigOperator(DataprocSubmitPigJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPigJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPigJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcPySparkOperator(DataprocSubmitPySparkJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPySparkJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPySparkJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcSparkOperator(DataprocSubmitSparkJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataProcSparkSqlOperator(DataprocSubmitSparkSqlJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkSqlJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkSqlJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataprocWorkflowTemplateInstantiateInlineOperator(DataprocInstantiateInlineWorkflowTemplateOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocInstantiateInlineWorkflowTemplateOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc - .DataprocInstantiateInlineWorkflowTemplateOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DataprocWorkflowTemplateInstantiateOperator(DataprocInstantiateWorkflowTemplateOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc.DataprocInstantiateWorkflowTemplateOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.dataproc - .DataprocInstantiateWorkflowTemplateOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/datastore_export_operator.py b/airflow/contrib/operators/datastore_export_operator.py deleted file mode 100644 index 085ee132607da..0000000000000 --- a/airflow/contrib/operators/datastore_export_operator.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.datastore`.""" - -import warnings - -from airflow.providers.google.cloud.operators.datastore import CloudDatastoreExportEntitiesOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.datastore`.", - DeprecationWarning, - stacklevel=2, -) - - -class DatastoreExportOperator(CloudDatastoreExportEntitiesOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.datastore.CloudDatastoreExportEntitiesOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated.l - Please use - `airflow.providers.google.cloud.operators.datastore.CloudDatastoreExportEntitiesOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/datastore_import_operator.py b/airflow/contrib/operators/datastore_import_operator.py deleted file mode 100644 index 5b15cd23c9516..0000000000000 --- a/airflow/contrib/operators/datastore_import_operator.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.datastore`.""" - -import warnings - -from airflow.providers.google.cloud.operators.datastore import CloudDatastoreImportEntitiesOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.datastore`.", - DeprecationWarning, - stacklevel=2, -) - - -class DatastoreImportOperator(CloudDatastoreImportEntitiesOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.datastore.CloudDatastoreImportEntitiesOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.datastore.CloudDatastoreImportEntitiesOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/dingding_operator.py b/airflow/contrib/operators/dingding_operator.py deleted file mode 100644 index bfe91e8a72491..0000000000000 --- a/airflow/contrib/operators/dingding_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.dingding.operators.dingding`.""" - -import warnings - -from airflow.providers.dingding.operators.dingding import DingdingOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.dingding.operators.dingding`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/discord_webhook_operator.py b/airflow/contrib/operators/discord_webhook_operator.py deleted file mode 100644 index be5809afbfcbd..0000000000000 --- a/airflow/contrib/operators/discord_webhook_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.discord.operators.discord_webhook`.""" - -import warnings - -from airflow.providers.discord.operators.discord_webhook import DiscordWebhookOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.discord.operators.discord_webhook`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/docker_swarm_operator.py b/airflow/contrib/operators/docker_swarm_operator.py deleted file mode 100644 index b023da796a4c8..0000000000000 --- a/airflow/contrib/operators/docker_swarm_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.docker.operators.docker_swarm`.""" - -import warnings - -from airflow.providers.docker.operators.docker_swarm import DockerSwarmOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.docker.operators.docker_swarm`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/druid_operator.py b/airflow/contrib/operators/druid_operator.py deleted file mode 100644 index 20dff77192313..0000000000000 --- a/airflow/contrib/operators/druid_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.druid.operators.druid`.""" - -import warnings - -from airflow.providers.apache.druid.operators.druid import DruidOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.druid.operators.druid`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/dynamodb_to_s3.py b/airflow/contrib/operators/dynamodb_to_s3.py deleted file mode 100644 index a2054007c0678..0000000000000 --- a/airflow/contrib/operators/dynamodb_to_s3.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.dynamodb_to_s3`.""" - -import warnings - -from airflow.providers.amazon.aws.transfers.dynamodb_to_s3 import DynamoDBToS3Operator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.dynamodb_to_s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/ecs_operator.py b/airflow/contrib/operators/ecs_operator.py deleted file mode 100644 index aee3c19bcde34..0000000000000 --- a/airflow/contrib/operators/ecs_operator.py +++ /dev/null @@ -1,47 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.ecs`.""" - -import warnings - -from airflow.providers.amazon.aws.hooks.ecs import EcsProtocol -from airflow.providers.amazon.aws.operators.ecs import EcsRunTaskOperator - -__all__ = ["EcsRunTaskOperator", "EcsProtocol"] - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.ecs`.", - DeprecationWarning, - stacklevel=2, -) - - -class EcsOperator(EcsRunTaskOperator): - """ - This operator is deprecated. - Please use :class:`airflow.providers.amazon.aws.operators.ecs.EcsRunTaskOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.amazon.aws.operators.ecs.EcsRunTaskOperator`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/emr_add_steps_operator.py b/airflow/contrib/operators/emr_add_steps_operator.py deleted file mode 100644 index f82939e8cdd41..0000000000000 --- a/airflow/contrib/operators/emr_add_steps_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.emr`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.emr import EmrAddStepsOperator -except ImportError: - from airflow.providers.amazon.aws.operators.emr_add_steps import ( # type: ignore[no-redef] # noqa - EmrAddStepsOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/emr_create_job_flow_operator.py b/airflow/contrib/operators/emr_create_job_flow_operator.py deleted file mode 100644 index 4d8753f8de2f4..0000000000000 --- a/airflow/contrib/operators/emr_create_job_flow_operator.py +++ /dev/null @@ -1,34 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.emr`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.emr import EmrCreateJobFlowOperator -except ImportError: - from airflow.providers.amazon.aws.operators.emr_create_job_flow import ( # type: ignore[no-redef] # noqa - EmrCreateJobFlowOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/emr_terminate_job_flow_operator.py b/airflow/contrib/operators/emr_terminate_job_flow_operator.py deleted file mode 100644 index a00bf80578fb0..0000000000000 --- a/airflow/contrib/operators/emr_terminate_job_flow_operator.py +++ /dev/null @@ -1,36 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.amazon.aws.operators.emr`. -""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.emr import EmrTerminateJobFlowOperator -except ImportError: - from airflow.providers.amazon.aws.operators.emr_terminate_job_flow import ( # type: ignore[no-redef] # noqa - EmrTerminateJobFlowOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/file_to_gcs.py b/airflow/contrib/operators/file_to_gcs.py deleted file mode 100644 index 227cd74979c2f..0000000000000 --- a/airflow/contrib/operators/file_to_gcs.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.local_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.local_to_gcs import LocalFilesystemToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.local_to_gcs`,", - DeprecationWarning, - stacklevel=2, -) - - -class FileToGoogleCloudStorageOperator(LocalFilesystemToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.local_to_gcs.LocalFilesystemToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.transfers.local_to_gcs.LocalFilesystemToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/file_to_wasb.py b/airflow/contrib/operators/file_to_wasb.py deleted file mode 100644 index eb6275d5bbd1f..0000000000000 --- a/airflow/contrib/operators/file_to_wasb.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.transfers.local_to_wasb`.""" - -import warnings - -from airflow.providers.microsoft.azure.transfers.local_to_wasb import LocalFilesystemToWasbOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.transfers.local_to_wasb`.", - DeprecationWarning, - stacklevel=2, -) - - -class FileToWasbOperator(LocalFilesystemToWasbOperator): - """ - This class is deprecated. - Please use `airflow.providers.microsoft.azure.transfers.local_to_wasb.LocalFilesystemToWasbOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.microsoft.azure.transfers.local_to_wasb.LocalFilesystemToWasbOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_bigtable_operator.py b/airflow/contrib/operators/gcp_bigtable_operator.py deleted file mode 100644 index f45fde7d5a388..0000000000000 --- a/airflow/contrib/operators/gcp_bigtable_operator.py +++ /dev/null @@ -1,136 +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. -""" -This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigtable` -or `airflow.providers.google.cloud.sensors.bigtable`. -""" - -import warnings - -from airflow.providers.google.cloud.operators.bigtable import ( - BigtableCreateInstanceOperator, - BigtableCreateTableOperator, - BigtableDeleteInstanceOperator, - BigtableDeleteTableOperator, - BigtableUpdateClusterOperator, -) -from airflow.providers.google.cloud.sensors.bigtable import BigtableTableReplicationCompletedSensor - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigtable`" - " or `airflow.providers.google.cloud.sensors.bigtable`.", - DeprecationWarning, - stacklevel=2, -) - - -class BigtableClusterUpdateOperator(BigtableUpdateClusterOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableUpdateClusterOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableUpdateClusterOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class BigtableInstanceCreateOperator(BigtableCreateInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableCreateInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableCreateInstanceOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class BigtableInstanceDeleteOperator(BigtableDeleteInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableDeleteInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableDeleteInstanceOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class BigtableTableCreateOperator(BigtableCreateTableOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableCreateTableOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableCreateTableOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class BigtableTableDeleteOperator(BigtableDeleteTableOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableDeleteTableOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.bigtable.BigtableDeleteTableOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class BigtableTableWaitForReplicationSensor(BigtableTableReplicationCompletedSensor): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.bigtable.BigtableTableReplicationCompletedSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.sensors.bigtable.BigtableTableReplicationCompletedSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_cloud_build_operator.py b/airflow/contrib/operators/gcp_cloud_build_operator.py deleted file mode 100644 index 443fdbfdab73f..0000000000000 --- a/airflow/contrib/operators/gcp_cloud_build_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.cloud_build`.""" - -import warnings - -from airflow.providers.google.cloud.operators.cloud_build import CloudBuildCreateBuildOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.cloud_build`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/gcp_compute_operator.py b/airflow/contrib/operators/gcp_compute_operator.py deleted file mode 100644 index d943fdf5587dd..0000000000000 --- a/airflow/contrib/operators/gcp_compute_operator.py +++ /dev/null @@ -1,138 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.compute`.""" - -import warnings - -from airflow.providers.google.cloud.operators.compute import ( - ComputeEngineBaseOperator, - ComputeEngineCopyInstanceTemplateOperator, - ComputeEngineInstanceGroupUpdateManagerTemplateOperator, - ComputeEngineSetMachineTypeOperator, - ComputeEngineStartInstanceOperator, - ComputeEngineStopInstanceOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.compute`.", - DeprecationWarning, - stacklevel=2, -) - - -class GceBaseOperator(ComputeEngineBaseOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute.ComputeEngineBaseOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute.ComputeEngineBaseOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GceInstanceGroupManagerUpdateTemplateOperator(ComputeEngineInstanceGroupUpdateManagerTemplateOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute - .ComputeEngineInstanceGroupUpdateManagerTemplateOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. Please use - `airflow.providers.google.cloud.operators.compute - .ComputeEngineInstanceGroupUpdateManagerTemplateOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GceInstanceStartOperator(ComputeEngineStartInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators - .compute.ComputeEngineStartInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute - .ComputeEngineStartInstanceOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GceInstanceStopOperator(ComputeEngineStopInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute.ComputeEngineStopInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute - .ComputeEngineStopInstanceOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GceInstanceTemplateCopyOperator(ComputeEngineCopyInstanceTemplateOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute.ComputeEngineCopyInstanceTemplateOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """"This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute - .ComputeEngineCopyInstanceTemplateOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GceSetMachineTypeOperator(ComputeEngineSetMachineTypeOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute.ComputeEngineSetMachineTypeOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.compute - .ComputeEngineSetMachineTypeOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_container_operator.py b/airflow/contrib/operators/gcp_container_operator.py deleted file mode 100644 index 8a26c40a8fe5d..0000000000000 --- a/airflow/contrib/operators/gcp_container_operator.py +++ /dev/null @@ -1,83 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.operators.kubernetes_engine`. -""" - -import warnings - -from airflow.providers.google.cloud.operators.kubernetes_engine import ( - GKECreateClusterOperator, - GKEDeleteClusterOperator, - GKEStartPodOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.kubernetes_engine`", - DeprecationWarning, - stacklevel=2, -) - - -class GKEClusterCreateOperator(GKECreateClusterOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.container.GKECreateClusterOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.container.GKECreateClusterOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GKEClusterDeleteOperator(GKEDeleteClusterOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.container.GKEDeleteClusterOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.container.GKEDeleteClusterOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GKEPodOperator(GKEStartPodOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.container.GKEStartPodOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.container.GKEStartPodOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_dlp_operator.py b/airflow/contrib/operators/gcp_dlp_operator.py deleted file mode 100644 index f5b4c07d4cc8d..0000000000000 --- a/airflow/contrib/operators/gcp_dlp_operator.py +++ /dev/null @@ -1,123 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.dlp`.""" - -import warnings - -from airflow.providers.google.cloud.operators.dlp import ( # noqa - CloudDLPCancelDLPJobOperator, - CloudDLPCreateDeidentifyTemplateOperator, - CloudDLPCreateDLPJobOperator, - CloudDLPCreateInspectTemplateOperator, - CloudDLPCreateJobTriggerOperator, - CloudDLPCreateStoredInfoTypeOperator, - CloudDLPDeidentifyContentOperator, - CloudDLPDeleteDeidentifyTemplateOperator, - CloudDLPDeleteDLPJobOperator, - CloudDLPDeleteInspectTemplateOperator, - CloudDLPDeleteJobTriggerOperator, - CloudDLPDeleteStoredInfoTypeOperator, - CloudDLPGetDeidentifyTemplateOperator, - CloudDLPGetDLPJobOperator, - CloudDLPGetDLPJobTriggerOperator, - CloudDLPGetInspectTemplateOperator, - CloudDLPGetStoredInfoTypeOperator, - CloudDLPInspectContentOperator, - CloudDLPListDeidentifyTemplatesOperator, - CloudDLPListDLPJobsOperator, - CloudDLPListInfoTypesOperator, - CloudDLPListInspectTemplatesOperator, - CloudDLPListJobTriggersOperator, - CloudDLPListStoredInfoTypesOperator, - CloudDLPRedactImageOperator, - CloudDLPReidentifyContentOperator, - CloudDLPUpdateDeidentifyTemplateOperator, - CloudDLPUpdateInspectTemplateOperator, - CloudDLPUpdateJobTriggerOperator, - CloudDLPUpdateStoredInfoTypeOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.dlp`.", - DeprecationWarning, - stacklevel=2, -) - - -class CloudDLPDeleteDlpJobOperator(CloudDLPDeleteDLPJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDLPJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDLPJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudDLPGetDlpJobOperator(CloudDLPGetDLPJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudDLPGetJobTripperOperator(CloudDLPGetDLPJobTriggerOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobTriggerOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobTriggerOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudDLPListDlpJobsOperator(CloudDLPListDLPJobsOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPListDLPJobsOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.dlp.CloudDLPListDLPJobsOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_function_operator.py b/airflow/contrib/operators/gcp_function_operator.py deleted file mode 100644 index 4ca96c5c8a648..0000000000000 --- a/airflow/contrib/operators/gcp_function_operator.py +++ /dev/null @@ -1,65 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.functions`.""" - -import warnings - -from airflow.providers.google.cloud.operators.functions import ( - CloudFunctionDeleteFunctionOperator, - CloudFunctionDeployFunctionOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.functions`.", - DeprecationWarning, - stacklevel=2, -) - - -class GcfFunctionDeleteOperator(CloudFunctionDeleteFunctionOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.function.CloudFunctionDeleteFunctionOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.function.CloudFunctionDeleteFunctionOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcfFunctionDeployOperator(CloudFunctionDeployFunctionOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.function.CloudFunctionDeployFunctionOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.function.CloudFunctionDeployFunctionOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_natural_language_operator.py b/airflow/contrib/operators/gcp_natural_language_operator.py deleted file mode 100644 index 8a98ccf6903f0..0000000000000 --- a/airflow/contrib/operators/gcp_natural_language_operator.py +++ /dev/null @@ -1,114 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.natural_language`.""" - -import warnings - -from airflow.providers.google.cloud.operators.natural_language import ( - CloudNaturalLanguageAnalyzeEntitiesOperator, - CloudNaturalLanguageAnalyzeEntitySentimentOperator, - CloudNaturalLanguageAnalyzeSentimentOperator, - CloudNaturalLanguageClassifyTextOperator, -) - -warnings.warn( - """This module is deprecated. - Please use `airflow.providers.google.cloud.operators.natural_language` - """, - DeprecationWarning, - stacklevel=2, -) - - -class CloudLanguageAnalyzeEntitiesOperator(CloudNaturalLanguageAnalyzeEntitiesOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.natural_language.CloudNaturalLanguageAnalyzeEntitiesOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.natural_language - .CloudNaturalLanguageAnalyzeEntitiesOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudLanguageAnalyzeEntitySentimentOperator(CloudNaturalLanguageAnalyzeEntitySentimentOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.natural_language - .CloudNaturalLanguageAnalyzeEntitySentimentOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.natural_language - .CloudNaturalLanguageAnalyzeEntitySentimentOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudLanguageAnalyzeSentimentOperator(CloudNaturalLanguageAnalyzeSentimentOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.natural_language.CloudNaturalLanguageAnalyzeSentimentOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.natural_language - .CloudNaturalLanguageAnalyzeSentimentOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudLanguageClassifyTextOperator(CloudNaturalLanguageClassifyTextOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.natural_language - .CloudNaturalLanguageClassifyTextOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.natural_language - .CloudNaturalLanguageClassifyTextOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_spanner_operator.py b/airflow/contrib/operators/gcp_spanner_operator.py deleted file mode 100644 index b2e50c3a80f6a..0000000000000 --- a/airflow/contrib/operators/gcp_spanner_operator.py +++ /dev/null @@ -1,125 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.spanner`.""" - -import warnings - -from airflow.providers.google.cloud.operators.spanner import ( - SpannerDeleteDatabaseInstanceOperator, - SpannerDeleteInstanceOperator, - SpannerDeployDatabaseInstanceOperator, - SpannerDeployInstanceOperator, - SpannerQueryDatabaseInstanceOperator, - SpannerUpdateDatabaseInstanceOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.spanner`.", - DeprecationWarning, - stacklevel=2, -) - - -class CloudSpannerInstanceDatabaseDeleteOperator(SpannerDeleteDatabaseInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.spanner.SpannerDeleteDatabaseInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - self.__doc__, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudSpannerInstanceDatabaseDeployOperator(SpannerDeployDatabaseInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.spanner.SpannerDeployDatabaseInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - self.__doc__, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudSpannerInstanceDatabaseQueryOperator(SpannerQueryDatabaseInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.spanner.SpannerQueryDatabaseInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - self.__doc__, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudSpannerInstanceDatabaseUpdateOperator(SpannerUpdateDatabaseInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.spanner.SpannerUpdateDatabaseInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - self.__doc__, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudSpannerInstanceDeleteOperator(SpannerDeleteInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.spanner.SpannerDeleteInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - self.__doc__, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudSpannerInstanceDeployOperator(SpannerDeployInstanceOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.spanner.SpannerDeployInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - self.__doc__, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_speech_to_text_operator.py b/airflow/contrib/operators/gcp_speech_to_text_operator.py deleted file mode 100644 index 499c8ab7f6e01..0000000000000 --- a/airflow/contrib/operators/gcp_speech_to_text_operator.py +++ /dev/null @@ -1,47 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.speech_to_text`.""" - -import warnings - -from airflow.providers.google.cloud.operators.speech_to_text import CloudSpeechToTextRecognizeSpeechOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.speech_to_text`", - DeprecationWarning, - stacklevel=2, -) - - -class GcpSpeechToTextRecognizeSpeechOperator(CloudSpeechToTextRecognizeSpeechOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.speech_to_text.CloudSpeechToTextRecognizeSpeechOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.speech_to_text - .CloudSpeechToTextRecognizeSpeechOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_sql_operator.py b/airflow/contrib/operators/gcp_sql_operator.py deleted file mode 100644 index 5cbbf8a80a294..0000000000000 --- a/airflow/contrib/operators/gcp_sql_operator.py +++ /dev/null @@ -1,149 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.cloud_sql`.""" - -import warnings - -from airflow.providers.google.cloud.operators.cloud_sql import ( - CloudSQLBaseOperator, - CloudSQLCreateInstanceDatabaseOperator, - CloudSQLCreateInstanceOperator, - CloudSQLDeleteInstanceDatabaseOperator, - CloudSQLDeleteInstanceOperator, - CloudSQLExecuteQueryOperator, - CloudSQLExportInstanceOperator, - CloudSQLImportInstanceOperator, - CloudSQLInstancePatchOperator, - CloudSQLPatchInstanceDatabaseOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.cloud_sql`", - DeprecationWarning, - stacklevel=2, -) - - -class CloudSqlBaseOperator(CloudSQLBaseOperator): - """ - This class is deprecated. Please use - `airflow.providers.google.cloud.operators.sql.CloudSQLBaseOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceCreateOperator(CloudSQLCreateInstanceOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLCreateInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceDatabaseCreateOperator(CloudSQLCreateInstanceDatabaseOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLCreateInstanceDatabaseOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceDatabaseDeleteOperator(CloudSQLDeleteInstanceDatabaseOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLDeleteInstanceDatabaseOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceDatabasePatchOperator(CloudSQLPatchInstanceDatabaseOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLPatchInstanceDatabaseOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceDeleteOperator(CloudSQLDeleteInstanceOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLDeleteInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceExportOperator(CloudSQLExportInstanceOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLExportInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstanceImportOperator(CloudSQLImportInstanceOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators.sql - .CloudSQLImportInstanceOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlInstancePatchOperator(CloudSQLInstancePatchOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators - .sql.CloudSQLInstancePatchOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) - - -class CloudSqlQueryOperator(CloudSQLExecuteQueryOperator): - """ - This class is deprecated. Please use `airflow.providers.google.cloud.operators - .sql.CloudSQLExecuteQueryOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn(self.__doc__, DeprecationWarning, stacklevel=2) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_tasks_operator.py b/airflow/contrib/operators/gcp_tasks_operator.py deleted file mode 100644 index 319ddb4fe2ad5..0000000000000 --- a/airflow/contrib/operators/gcp_tasks_operator.py +++ /dev/null @@ -1,42 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.tasks`.""" - -import warnings - -from airflow.providers.google.cloud.operators.tasks import ( # noqa - CloudTasksQueueCreateOperator, - CloudTasksQueueDeleteOperator, - CloudTasksQueueGetOperator, - CloudTasksQueuePauseOperator, - CloudTasksQueuePurgeOperator, - CloudTasksQueueResumeOperator, - CloudTasksQueuesListOperator, - CloudTasksQueueUpdateOperator, - CloudTasksTaskCreateOperator, - CloudTasksTaskDeleteOperator, - CloudTasksTaskGetOperator, - CloudTasksTaskRunOperator, - CloudTasksTasksListOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.tasks`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/gcp_text_to_speech_operator.py b/airflow/contrib/operators/gcp_text_to_speech_operator.py deleted file mode 100644 index af5ff2f39d122..0000000000000 --- a/airflow/contrib/operators/gcp_text_to_speech_operator.py +++ /dev/null @@ -1,45 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.text_to_speech`.""" - -import warnings - -from airflow.providers.google.cloud.operators.text_to_speech import CloudTextToSpeechSynthesizeOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.text_to_speech`", - DeprecationWarning, - stacklevel=2, -) - - -class GcpTextToSpeechSynthesizeOperator(CloudTextToSpeechSynthesizeOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.text_to_speech.CloudTextToSpeechSynthesizeOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.text_to_speech.CloudTextToSpeechSynthesizeOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_transfer_operator.py b/airflow/contrib/operators/gcp_transfer_operator.py deleted file mode 100644 index bd7c7bc2cb752..0000000000000 --- a/airflow/contrib/operators/gcp_transfer_operator.py +++ /dev/null @@ -1,229 +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. -""" -This module is deprecated. -Please use `airflow.providers.google.cloud.operators.cloud_storage_transfer_service`. -""" - -import warnings - -from airflow.providers.google.cloud.operators.cloud_storage_transfer_service import ( - CloudDataTransferServiceCancelOperationOperator, - CloudDataTransferServiceCreateJobOperator, - CloudDataTransferServiceDeleteJobOperator, - CloudDataTransferServiceGCSToGCSOperator, - CloudDataTransferServiceGetOperationOperator, - CloudDataTransferServiceListOperationsOperator, - CloudDataTransferServicePauseOperationOperator, - CloudDataTransferServiceResumeOperationOperator, - CloudDataTransferServiceS3ToGCSOperator, - CloudDataTransferServiceUpdateJobOperator, -) - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.google.cloud.operators.cloud_storage_transfer_service`", - DeprecationWarning, - stacklevel=2, -) - - -class GcpTransferServiceJobCreateOperator(CloudDataTransferServiceCreateJobOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.data_transfer.CloudDataTransferServiceCreateJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceCreateJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceJobDeleteOperator(CloudDataTransferServiceDeleteJobOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.data_transfer.CloudDataTransferServiceDeleteJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceDeleteJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceJobUpdateOperator(CloudDataTransferServiceUpdateJobOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.data_transfer.CloudDataTransferServiceUpdateJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceUpdateJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceOperationCancelOperator(CloudDataTransferServiceCancelOperationOperator): - """ - This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.data_transfer.CloudDataTransferServiceCancelOperationOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceCancelOperationOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceOperationGetOperator(CloudDataTransferServiceGetOperationOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceGetOperationOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceGetOperationOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceOperationPauseOperator(CloudDataTransferServicePauseOperationOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServicePauseOperationOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServicePauseOperationOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceOperationResumeOperator(CloudDataTransferServiceResumeOperationOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceResumeOperationOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceResumeOperationOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GcpTransferServiceOperationsListOperator(CloudDataTransferServiceListOperationsOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceListOperationsOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceListOperationsOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GoogleCloudStorageToGoogleCloudStorageTransferOperator(CloudDataTransferServiceGCSToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceGCSToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceGCSToGCSOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class S3ToGoogleCloudStorageTransferOperator(CloudDataTransferServiceS3ToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceS3ToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """"This class is deprecated. - Please use `airflow.providers.google.cloud.operators.data_transfer - .CloudDataTransferServiceS3ToGCSOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_translate_operator.py b/airflow/contrib/operators/gcp_translate_operator.py deleted file mode 100644 index c61cc8492c250..0000000000000 --- a/airflow/contrib/operators/gcp_translate_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.translate`.""" - -import warnings - -from airflow.providers.google.cloud.operators.translate import CloudTranslateTextOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.translate`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/gcp_translate_speech_operator.py b/airflow/contrib/operators/gcp_translate_speech_operator.py deleted file mode 100644 index 2e0bb70787b61..0000000000000 --- a/airflow/contrib/operators/gcp_translate_speech_operator.py +++ /dev/null @@ -1,49 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.operators.translate_speech`. -""" - -import warnings - -from airflow.providers.google.cloud.operators.translate_speech import CloudTranslateSpeechOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.translate_speech`.", - DeprecationWarning, - stacklevel=2, -) - - -class GcpTranslateSpeechOperator(CloudTranslateSpeechOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.translate_speech.CloudTranslateSpeechOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.translate_speech.CloudTranslateSpeechOperator`. - """, - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcp_video_intelligence_operator.py b/airflow/contrib/operators/gcp_video_intelligence_operator.py deleted file mode 100644 index a82fc9aeb8411..0000000000000 --- a/airflow/contrib/operators/gcp_video_intelligence_operator.py +++ /dev/null @@ -1,35 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.operators.video_intelligence`. -""" - -import warnings - -from airflow.providers.google.cloud.operators.video_intelligence import ( # noqa - CloudVideoIntelligenceDetectVideoExplicitContentOperator, - CloudVideoIntelligenceDetectVideoLabelsOperator, - CloudVideoIntelligenceDetectVideoShotsOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.video_intelligence`", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/gcp_vision_operator.py b/airflow/contrib/operators/gcp_vision_operator.py deleted file mode 100644 index 09a5b1e817e28..0000000000000 --- a/airflow/contrib/operators/gcp_vision_operator.py +++ /dev/null @@ -1,227 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.vision`.""" - -import warnings - -from airflow.providers.google.cloud.operators.vision import ( # noqa - CloudVisionAddProductToProductSetOperator, - CloudVisionCreateProductOperator, - CloudVisionCreateProductSetOperator, - CloudVisionCreateReferenceImageOperator, - CloudVisionDeleteProductOperator, - CloudVisionDeleteProductSetOperator, - CloudVisionDetectImageLabelsOperator, - CloudVisionDetectImageSafeSearchOperator, - CloudVisionDetectTextOperator, - CloudVisionGetProductOperator, - CloudVisionGetProductSetOperator, - CloudVisionImageAnnotateOperator, - CloudVisionRemoveProductFromProductSetOperator, - CloudVisionTextDetectOperator, - CloudVisionUpdateProductOperator, - CloudVisionUpdateProductSetOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.vision`.", - DeprecationWarning, - stacklevel=2, -) - - -class CloudVisionAnnotateImageOperator(CloudVisionImageAnnotateOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionImageAnnotateOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionImageAnnotateOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionDetectDocumentTextOperator(CloudVisionTextDetectOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionTextDetectOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionTextDetectOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductCreateOperator(CloudVisionCreateProductOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductDeleteOperator(CloudVisionDeleteProductOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductGetOperator(CloudVisionGetProductOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionGetProductOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionGetProductOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductSetCreateOperator(CloudVisionCreateProductSetOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductSetOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductSetOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductSetDeleteOperator(CloudVisionDeleteProductSetOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductSetOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductSetOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductSetGetOperator(CloudVisionGetProductSetOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionGetProductSetOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.vision.CloudVisionGetProductSetOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductSetUpdateOperator(CloudVisionUpdateProductSetOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductSetOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductSetOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionProductUpdateOperator(CloudVisionUpdateProductOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class CloudVisionReferenceImageCreateOperator(CloudVisionCreateReferenceImageOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.vision.CloudVisionCreateReferenceImageOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.vision.CloudVisionCreateReferenceImageOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_acl_operator.py b/airflow/contrib/operators/gcs_acl_operator.py deleted file mode 100644 index f3e6afa303602..0000000000000 --- a/airflow/contrib/operators/gcs_acl_operator.py +++ /dev/null @@ -1,63 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`.""" - -import warnings - -from airflow.providers.google.cloud.operators.gcs import ( - GCSBucketCreateAclEntryOperator, - GCSObjectCreateAclEntryOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageBucketCreateAclEntryOperator(GCSBucketCreateAclEntryOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSBucketCreateAclEntryOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSBucketCreateAclEntryOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GoogleCloudStorageObjectCreateAclEntryOperator(GCSObjectCreateAclEntryOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSObjectCreateAclEntryOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSObjectCreateAclEntryOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_delete_operator.py b/airflow/contrib/operators/gcs_delete_operator.py deleted file mode 100644 index 42fa2a89057d1..0000000000000 --- a/airflow/contrib/operators/gcs_delete_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`.""" - -import warnings - -from airflow.providers.google.cloud.operators.gcs import GCSDeleteObjectsOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageDeleteOperator(GCSDeleteObjectsOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSDeleteObjectsOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSDeleteObjectsOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_download_operator.py b/airflow/contrib/operators/gcs_download_operator.py deleted file mode 100644 index a6904320bd2c2..0000000000000 --- a/airflow/contrib/operators/gcs_download_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.gcs_to_local import GCSToLocalFilesystemOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageDownloadOperator(GCSToLocalFilesystemOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSToLocalFilesystemOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSToLocalFilesystemOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_list_operator.py b/airflow/contrib/operators/gcs_list_operator.py deleted file mode 100644 index a18ec272a5907..0000000000000 --- a/airflow/contrib/operators/gcs_list_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`.""" - -import warnings - -from airflow.providers.google.cloud.operators.gcs import GCSListObjectsOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageListOperator(GCSListObjectsOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSListObjectsOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSListObjectsOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_operator.py b/airflow/contrib/operators/gcs_operator.py deleted file mode 100644 index 4f0aecbf9c167..0000000000000 --- a/airflow/contrib/operators/gcs_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`.""" - -import warnings - -from airflow.providers.google.cloud.operators.gcs import GCSCreateBucketOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageCreateBucketOperator(GCSCreateBucketOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSCreateBucketOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.gcs.GCSCreateBucketOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_to_bq.py b/airflow/contrib/operators/gcs_to_bq.py deleted file mode 100644 index ab71bb8da7989..0000000000000 --- a/airflow/contrib/operators/gcs_to_bq.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.gcs_to_bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.gcs_to_bigquery import GCSToBigQueryOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.gcs_to_bigquery`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageToBigQueryOperator(GCSToBigQueryOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.gcs_to_bigquery.GCSToBigQueryOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.gcs_to_bigquery.GCSToBigQueryOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_to_gcs.py b/airflow/contrib/operators/gcs_to_gcs.py deleted file mode 100644 index ab6f2d91c1ba9..0000000000000 --- a/airflow/contrib/operators/gcs_to_gcs.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.gcs_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.gcs_to_gcs import GCSToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.gcs_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageToGoogleCloudStorageOperator(GCSToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.gcs_to_gcs.GCSToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.gcs_to_gcs.GCSToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/gcs_to_gcs_transfer_operator.py b/airflow/contrib/operators/gcs_to_gcs_transfer_operator.py deleted file mode 100644 index 75a672f2c18b2..0000000000000 --- a/airflow/contrib/operators/gcs_to_gcs_transfer_operator.py +++ /dev/null @@ -1,30 +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. -""" -This module is deprecated. -Please use `airflow.providers.google.cloud.operators.cloud_storage_transfer_service`. -""" - -import warnings - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.google.cloud.operators.cloud_storage_transfer_service`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/gcs_to_gdrive_operator.py b/airflow/contrib/operators/gcs_to_gdrive_operator.py deleted file mode 100644 index 1fb55d1fc3dfe..0000000000000 --- a/airflow/contrib/operators/gcs_to_gdrive_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.suite.transfers.gcs_to_gdrive`.""" - -import warnings - -from airflow.providers.google.suite.transfers.gcs_to_gdrive import GCSToGoogleDriveOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.suite.transfers.gcs_to_gdrive.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/gcs_to_s3.py b/airflow/contrib/operators/gcs_to_s3.py deleted file mode 100644 index 13aa005ab20a3..0000000000000 --- a/airflow/contrib/operators/gcs_to_s3.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.gcs_to_s3`.""" - -import warnings - -from airflow.providers.amazon.aws.transfers.gcs_to_s3 import GCSToS3Operator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.gcs_to_s3`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageToS3Operator(GCSToS3Operator): - """ - This class is deprecated. Please use - `airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Operator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use `airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Operator`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/grpc_operator.py b/airflow/contrib/operators/grpc_operator.py deleted file mode 100644 index bd8cfbd6003ee..0000000000000 --- a/airflow/contrib/operators/grpc_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.grpc.operators.grpc`.""" - -import warnings - -from airflow.providers.grpc.operators.grpc import GrpcOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.grpc.operators.grpc`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/hive_to_dynamodb.py b/airflow/contrib/operators/hive_to_dynamodb.py deleted file mode 100644 index ba4f8b967cc98..0000000000000 --- a/airflow/contrib/operators/hive_to_dynamodb.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.hive_to_dynamodb`.""" - -import warnings - -from airflow.providers.amazon.aws.transfers.hive_to_dynamodb import HiveToDynamoDBOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.hive_to_dynamodb`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/imap_attachment_to_s3_operator.py b/airflow/contrib/operators/imap_attachment_to_s3_operator.py deleted file mode 100644 index e82a8bc05aeae..0000000000000 --- a/airflow/contrib/operators/imap_attachment_to_s3_operator.py +++ /dev/null @@ -1,31 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.amazon.aws.transfers.imap_attachment_to_s3`. -""" - -import warnings - -from airflow.providers.amazon.aws.transfers.imap_attachment_to_s3 import ImapAttachmentToS3Operator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.imap_attachment_to_s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/jenkins_job_trigger_operator.py b/airflow/contrib/operators/jenkins_job_trigger_operator.py deleted file mode 100644 index 0b401d2b430a7..0000000000000 --- a/airflow/contrib/operators/jenkins_job_trigger_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.jenkins.operators.jenkins_job_trigger`.""" - -import warnings - -from airflow.providers.jenkins.operators.jenkins_job_trigger import JenkinsJobTriggerOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.jenkins.operators.jenkins_job_trigger`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/jira_operator.py b/airflow/contrib/operators/jira_operator.py deleted file mode 100644 index 0d44e9bceedee..0000000000000 --- a/airflow/contrib/operators/jira_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.atlassian.jira.operators.jira`.""" - -import warnings - -from airflow.providers.atlassian.jira.operators.jira import JiraOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.atlassian.jira.operators.jira`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/kubernetes_pod_operator.py b/airflow/contrib/operators/kubernetes_pod_operator.py deleted file mode 100644 index 962fa22859013..0000000000000 --- a/airflow/contrib/operators/kubernetes_pod_operator.py +++ /dev/null @@ -1,31 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.cncf.kubernetes.operators.kubernetes_pod`. -""" - -import warnings - -from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.kubernetes_pod`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/mlengine_operator.py b/airflow/contrib/operators/mlengine_operator.py deleted file mode 100644 index d5d6b2fb1d24a..0000000000000 --- a/airflow/contrib/operators/mlengine_operator.py +++ /dev/null @@ -1,100 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.mlengine`.""" - -import warnings - -from airflow.providers.google.cloud.operators.mlengine import ( - MLEngineManageModelOperator, - MLEngineManageVersionOperator, - MLEngineStartBatchPredictionJobOperator, - MLEngineStartTrainingJobOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.operators.mlengine`.", - DeprecationWarning, - stacklevel=2, -) - - -class MLEngineBatchPredictionOperator(MLEngineStartBatchPredictionJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.mlengine.MLEngineStartBatchPredictionJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.mlengine.MLEngineStartBatchPredictionJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class MLEngineModelOperator(MLEngineManageModelOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.mlengine.MLEngineManageModelOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.mlengine.MLEngineManageModelOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class MLEngineTrainingOperator(MLEngineStartTrainingJobOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.mlengine.MLEngineStartTrainingJobOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.mlengine.MLEngineStartTrainingJobOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class MLEngineVersionOperator(MLEngineManageVersionOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.operators.mlengine.MLEngineManageVersionOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.operators.mlengine.MLEngineManageVersionOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/mongo_to_s3.py b/airflow/contrib/operators/mongo_to_s3.py deleted file mode 100644 index 17b0676952e91..0000000000000 --- a/airflow/contrib/operators/mongo_to_s3.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.mongo_to_s3`.""" - -import warnings - -from airflow.providers.amazon.aws.transfers.mongo_to_s3 import MongoToS3Operator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.mongo_to_s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/mssql_to_gcs.py b/airflow/contrib/operators/mssql_to_gcs.py deleted file mode 100644 index 140457bb709f4..0000000000000 --- a/airflow/contrib/operators/mssql_to_gcs.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.mssql_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.mssql_to_gcs import MSSQLToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.mssql_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class MsSqlToGoogleCloudStorageOperator(MSSQLToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.mssql_to_gcs.MSSQLToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.mssql_to_gcs.MSSQLToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/mysql_to_gcs.py b/airflow/contrib/operators/mysql_to_gcs.py deleted file mode 100644 index 50363b3a39bc6..0000000000000 --- a/airflow/contrib/operators/mysql_to_gcs.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.mysql_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.mysql_to_gcs import MySQLToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.mysql_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class MySqlToGoogleCloudStorageOperator(MySQLToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.mysql_to_gcs.MySQLToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.mysql_to_gcs.MySQLToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/opsgenie_alert_operator.py b/airflow/contrib/operators/opsgenie_alert_operator.py deleted file mode 100644 index 008214b97e020..0000000000000 --- a/airflow/contrib/operators/opsgenie_alert_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.opsgenie.operators.opsgenie`.""" - -import warnings - -from airflow.providers.opsgenie.operators.opsgenie import OpsgenieCreateAlertOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.opsgenie.operators.opsgenie`.", - DeprecationWarning, - stacklevel=2, -) - - -class OpsgenieAlertOperator(OpsgenieCreateAlertOperator): - """ - This class is deprecated. - Please use :class:`airflow.providers.opsgenie.operators.opsgenie.OpsgenieCreateAlertOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use :class:`airflow.providers.opsgenie.operators.opsgenie.OpsgenieCreateAlertOperator`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/oracle_to_azure_data_lake_transfer.py b/airflow/contrib/operators/oracle_to_azure_data_lake_transfer.py deleted file mode 100644 index 3907b6f8e8b6b..0000000000000 --- a/airflow/contrib/operators/oracle_to_azure_data_lake_transfer.py +++ /dev/null @@ -1,34 +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. -""" -This module is deprecated. -Please use `airflow.providers.microsoft.azure.transfers.oracle_to_azure_data_lake`. -""" - -import warnings - -from airflow.providers.microsoft.azure.transfers.oracle_to_azure_data_lake import ( # noqa - OracleToAzureDataLakeOperator, -) - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.microsoft.azure.transfers.oracle_to_azure_data_lake`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/oracle_to_oracle_transfer.py b/airflow/contrib/operators/oracle_to_oracle_transfer.py deleted file mode 100644 index 2efbf4d0a89b4..0000000000000 --- a/airflow/contrib/operators/oracle_to_oracle_transfer.py +++ /dev/null @@ -1,49 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.oracle.transfers.oracle_to_oracle`. -""" - -import warnings - -from airflow.providers.oracle.transfers.oracle_to_oracle import OracleToOracleOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.oracle.transfers.oracle_to_oracle`.", - DeprecationWarning, - stacklevel=2, -) - - -class OracleToOracleTransfer(OracleToOracleOperator): - """This class is deprecated. - - Please use: - `airflow.providers.oracle.transfers.oracle_to_oracle.OracleToOracleOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.oracle.transfers.oracle_to_oracle.OracleToOracleOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/postgres_to_gcs_operator.py b/airflow/contrib/operators/postgres_to_gcs_operator.py deleted file mode 100644 index 1ce5f42304ce5..0000000000000 --- a/airflow/contrib/operators/postgres_to_gcs_operator.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.postgres_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.postgres_to_gcs import PostgresToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.postgres_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class PostgresToGoogleCloudStorageOperator(PostgresToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.postgres_to_gcs.PostgresToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.postgres_to_gcs.PostgresToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/pubsub_operator.py b/airflow/contrib/operators/pubsub_operator.py deleted file mode 100644 index 9d85d32fefed1..0000000000000 --- a/airflow/contrib/operators/pubsub_operator.py +++ /dev/null @@ -1,118 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.operators.pubsub`. -""" - -import warnings - -from airflow.providers.google.cloud.operators.pubsub import ( - PubSubCreateSubscriptionOperator, - PubSubCreateTopicOperator, - PubSubDeleteSubscriptionOperator, - PubSubDeleteTopicOperator, - PubSubPublishMessageOperator, -) - -warnings.warn( - """This module is deprecated. - "Please use `airflow.providers.google.cloud.operators.pubsub`.""", - DeprecationWarning, - stacklevel=2, -) - - -class PubSubPublishOperator(PubSubPublishMessageOperator): - """This class is deprecated. - - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubPublishMessageOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubPublishMessageOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class PubSubSubscriptionCreateOperator(PubSubCreateSubscriptionOperator): - """This class is deprecated. - - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubCreateSubscriptionOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubCreateSubscriptionOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class PubSubSubscriptionDeleteOperator(PubSubDeleteSubscriptionOperator): - """This class is deprecated. - - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubDeleteSubscriptionOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubDeleteSubscriptionOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class PubSubTopicCreateOperator(PubSubCreateTopicOperator): - """This class is deprecated. - - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubCreateTopicOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubCreateTopicOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class PubSubTopicDeleteOperator(PubSubDeleteTopicOperator): - """This class is deprecated. - - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubDeleteTopicOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.operators.pubsub.PubSubDeleteTopicOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/qubole_check_operator.py b/airflow/contrib/operators/qubole_check_operator.py deleted file mode 100644 index e42a9e0c8f13a..0000000000000 --- a/airflow/contrib/operators/qubole_check_operator.py +++ /dev/null @@ -1,31 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.qubole.operators.qubole_check`.""" - -import warnings - -from airflow.providers.qubole.operators.qubole_check import ( # noqa - QuboleCheckOperator, - QuboleValueCheckOperator, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.qubole.operators.qubole_check`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/qubole_operator.py b/airflow/contrib/operators/qubole_operator.py deleted file mode 100644 index e4a30748a03c6..0000000000000 --- a/airflow/contrib/operators/qubole_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.qubole.operators.qubole`.""" - -import warnings - -from airflow.providers.qubole.operators.qubole import QuboleOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.qubole.operators.qubole`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/redis_publish_operator.py b/airflow/contrib/operators/redis_publish_operator.py deleted file mode 100644 index 994d9323ad170..0000000000000 --- a/airflow/contrib/operators/redis_publish_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.redis.operators.redis_publish`.""" - -import warnings - -from airflow.providers.redis.operators.redis_publish import RedisPublishOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.redis.operators.redis_publish`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/s3_copy_object_operator.py b/airflow/contrib/operators/s3_copy_object_operator.py deleted file mode 100644 index 6da42b2e1cd9c..0000000000000 --- a/airflow/contrib/operators/s3_copy_object_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.s3`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.s3 import S3CopyObjectOperator -except ImportError: - from airflow.providers.amazon.aws.operators.s3_copy_object import ( # type: ignore[no-redef] # noqa - S3CopyObjectOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/s3_delete_objects_operator.py b/airflow/contrib/operators/s3_delete_objects_operator.py deleted file mode 100644 index 5c830d89dac32..0000000000000 --- a/airflow/contrib/operators/s3_delete_objects_operator.py +++ /dev/null @@ -1,36 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.amazon.aws.operators.s3`. -""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.s3 import S3DeleteObjectsOperator -except ImportError: - from airflow.providers.amazon.aws.operators.s3_delete_objects import ( # type: ignore[no-redef] # noqa - S3DeleteObjectsOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/s3_list_operator.py b/airflow/contrib/operators/s3_list_operator.py deleted file mode 100644 index 1f622a09474e0..0000000000000 --- a/airflow/contrib/operators/s3_list_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.s3`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.s3 import S3ListOperator -except ImportError: - from airflow.providers.amazon.aws.operators.s3_list import ( # type: ignore[no-redef] # noqa - S3ListOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/s3_to_gcs_operator.py b/airflow/contrib/operators/s3_to_gcs_operator.py deleted file mode 100644 index d0ea8e09bdbb1..0000000000000 --- a/airflow/contrib/operators/s3_to_gcs_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.s3_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.s3_to_gcs import S3ToGCSOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.s3_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/s3_to_gcs_transfer_operator.py b/airflow/contrib/operators/s3_to_gcs_transfer_operator.py deleted file mode 100644 index 71df06229334b..0000000000000 --- a/airflow/contrib/operators/s3_to_gcs_transfer_operator.py +++ /dev/null @@ -1,33 +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. -""" -This module is deprecated. -Please use `airflow.providers.google.cloud.operators.cloud_storage_transfer_service`. -""" -import warnings - -from airflow.providers.google.cloud.operators.cloud_storage_transfer_service import ( # noqa isort:skip - CloudDataTransferServiceS3ToGCSOperator, -) - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.google.cloud.operators.cloud_storage_transfer_service`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/s3_to_sftp_operator.py b/airflow/contrib/operators/s3_to_sftp_operator.py deleted file mode 100644 index e129af1471782..0000000000000 --- a/airflow/contrib/operators/s3_to_sftp_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.s3_to_sftp`.""" - -import warnings - -from airflow.providers.amazon.aws.transfers.s3_to_sftp import S3ToSFTPOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.s3_to_sftp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_base_operator.py b/airflow/contrib/operators/sagemaker_base_operator.py deleted file mode 100644 index c23519b3b5a5f..0000000000000 --- a/airflow/contrib/operators/sagemaker_base_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerBaseOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_base import ( # type: ignore[no-redef] # noqa - SageMakerBaseOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_endpoint_config_operator.py b/airflow/contrib/operators/sagemaker_endpoint_config_operator.py deleted file mode 100644 index 0416cd45d843e..0000000000000 --- a/airflow/contrib/operators/sagemaker_endpoint_config_operator.py +++ /dev/null @@ -1,36 +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. -""" -This module is deprecated. -Please use `airflow.providers.amazon.aws.operators.sagemaker`. -""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerEndpointConfigOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_endpoint_config import ( # type: ignore[no-redef] # noqa - SageMakerEndpointConfigOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_endpoint_operator.py b/airflow/contrib/operators/sagemaker_endpoint_operator.py deleted file mode 100644 index 398f06c5fa567..0000000000000 --- a/airflow/contrib/operators/sagemaker_endpoint_operator.py +++ /dev/null @@ -1,36 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker`. -""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerEndpointOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_endpoint import ( # type: ignore[no-redef] # noqa - SageMakerEndpointOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_model_operator.py b/airflow/contrib/operators/sagemaker_model_operator.py deleted file mode 100644 index 240c9ce495438..0000000000000 --- a/airflow/contrib/operators/sagemaker_model_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerModelOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_model import ( # type: ignore[no-redef] # noqa - SageMakerModelOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_training_operator.py b/airflow/contrib/operators/sagemaker_training_operator.py deleted file mode 100644 index 5b283f260a2fa..0000000000000 --- a/airflow/contrib/operators/sagemaker_training_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerTrainingOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_training import ( # type: ignore[no-redef] # noqa - SageMakerTrainingOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_transform_operator.py b/airflow/contrib/operators/sagemaker_transform_operator.py deleted file mode 100644 index 07dbfab5e77c3..0000000000000 --- a/airflow/contrib/operators/sagemaker_transform_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerTransformOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_transform import ( # type: ignore[no-redef] # noqa - SageMakerTransformOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sagemaker_tuning_operator.py b/airflow/contrib/operators/sagemaker_tuning_operator.py deleted file mode 100644 index 293e6cbb03728..0000000000000 --- a/airflow/contrib/operators/sagemaker_tuning_operator.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.operators.sagemaker import SageMakerTuningOperator -except ImportError: - from airflow.providers.amazon.aws.operators.sagemaker_tuning import ( # type: ignore[no-redef] # noqa - SageMakerTuningOperator, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/segment_track_event_operator.py b/airflow/contrib/operators/segment_track_event_operator.py deleted file mode 100644 index 92419a1977405..0000000000000 --- a/airflow/contrib/operators/segment_track_event_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.segment.operators.segment_track_event`.""" - -import warnings - -from airflow.providers.segment.operators.segment_track_event import SegmentTrackEventOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.segment.operators.segment_track_event`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sftp_operator.py b/airflow/contrib/operators/sftp_operator.py deleted file mode 100644 index e73a84743c83b..0000000000000 --- a/airflow/contrib/operators/sftp_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.sftp.operators.sftp`.""" - -import warnings - -from airflow.providers.sftp.operators.sftp import SFTPOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.sftp.operators.sftp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sftp_to_s3_operator.py b/airflow/contrib/operators/sftp_to_s3_operator.py deleted file mode 100644 index 7c13b1817d63e..0000000000000 --- a/airflow/contrib/operators/sftp_to_s3_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.sftp_to_s3`.""" - -import warnings - -from airflow.providers.amazon.aws.transfers.sftp_to_s3 import SFTPToS3Operator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.sftp_to_s3`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/slack_webhook_operator.py b/airflow/contrib/operators/slack_webhook_operator.py deleted file mode 100644 index f271102e14550..0000000000000 --- a/airflow/contrib/operators/slack_webhook_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.slack.operators.slack_webhook`.""" - -import warnings - -from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.slack.operators.slack_webhook`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/snowflake_operator.py b/airflow/contrib/operators/snowflake_operator.py deleted file mode 100644 index f01cc72d1a531..0000000000000 --- a/airflow/contrib/operators/snowflake_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.snowflake.operators.snowflake`.""" - -import warnings - -from airflow.providers.snowflake.operators.snowflake import SnowflakeOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.snowflake.operators.snowflake`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sns_publish_operator.py b/airflow/contrib/operators/sns_publish_operator.py deleted file mode 100644 index 104e240836f12..0000000000000 --- a/airflow/contrib/operators/sns_publish_operator.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sns`.""" - -import warnings - -from airflow.providers.amazon.aws.operators.sns import SnsPublishOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sns`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/spark_jdbc_operator.py b/airflow/contrib/operators/spark_jdbc_operator.py deleted file mode 100644 index fc3cdc02704c6..0000000000000 --- a/airflow/contrib/operators/spark_jdbc_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.operators.spark_jdbc`.""" - -import warnings - -from airflow.providers.apache.spark.operators.spark_jdbc import SparkJDBCOperator, SparkSubmitOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.spark.operators.spark_jdbc`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/spark_sql_operator.py b/airflow/contrib/operators/spark_sql_operator.py deleted file mode 100644 index 19e20d215dbf5..0000000000000 --- a/airflow/contrib/operators/spark_sql_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.operators.spark_sql`.""" - -import warnings - -from airflow.providers.apache.spark.operators.spark_sql import SparkSqlOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.spark.operators.spark_sql`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/spark_submit_operator.py b/airflow/contrib/operators/spark_submit_operator.py deleted file mode 100644 index 103187e445fa4..0000000000000 --- a/airflow/contrib/operators/spark_submit_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.operators.spark_submit`.""" - -import warnings - -from airflow.providers.apache.spark.operators.spark_submit import SparkSubmitOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.spark.operators.spark_submit`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/sql_to_gcs.py b/airflow/contrib/operators/sql_to_gcs.py deleted file mode 100644 index 13aa869c5d98d..0000000000000 --- a/airflow/contrib/operators/sql_to_gcs.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.sql_to_gcs`.""" - -import warnings - -from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.transfers.sql_to_gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class BaseSQLToGoogleCloudStorageOperator(BaseSQLToGCSOperator): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.sql_to_gcs.BaseSQLToGCSOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.transfers.sql_to_gcs.BaseSQLToGCSOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/sqoop_operator.py b/airflow/contrib/operators/sqoop_operator.py deleted file mode 100644 index 2757847abd65e..0000000000000 --- a/airflow/contrib/operators/sqoop_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.apache.sqoop.operators.sqoop`.""" - -import warnings - -from airflow.providers.apache.sqoop.operators.sqoop import SqoopOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.sqoop.operators.sqoop`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/ssh_operator.py b/airflow/contrib/operators/ssh_operator.py deleted file mode 100644 index 56f94b9b26b63..0000000000000 --- a/airflow/contrib/operators/ssh_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.ssh.operators.ssh`.""" - -import warnings - -from airflow.providers.ssh.operators.ssh import SSHOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.ssh.operators.ssh`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/vertica_operator.py b/airflow/contrib/operators/vertica_operator.py deleted file mode 100644 index e652512ad4056..0000000000000 --- a/airflow/contrib/operators/vertica_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.vertica.operators.vertica`.""" - -import warnings - -from airflow.providers.vertica.operators.vertica import VerticaOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.vertica.operators.vertica`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/vertica_to_hive.py b/airflow/contrib/operators/vertica_to_hive.py deleted file mode 100644 index 49ddea172f374..0000000000000 --- a/airflow/contrib/operators/vertica_to_hive.py +++ /dev/null @@ -1,49 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.apache.hive.transfers.vertica_to_hive`. -""" - -import warnings - -from airflow.providers.apache.hive.transfers.vertica_to_hive import VerticaToHiveOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.hive.transfers.vertica_to_hive`.", - DeprecationWarning, - stacklevel=2, -) - - -class VerticaToHiveTransfer(VerticaToHiveOperator): - """This class is deprecated. - - Please use: - `airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaToHiveOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaToHiveOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/vertica_to_mysql.py b/airflow/contrib/operators/vertica_to_mysql.py deleted file mode 100644 index c85738f9091b2..0000000000000 --- a/airflow/contrib/operators/vertica_to_mysql.py +++ /dev/null @@ -1,49 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.mysql.transfers.vertica_to_mysql`. -""" - -import warnings - -from airflow.providers.mysql.transfers.vertica_to_mysql import VerticaToMySqlOperator - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.mysql.transfers.vertica_to_mysql`.", - DeprecationWarning, - stacklevel=2, -) - - -class VerticaToMySqlTransfer(VerticaToMySqlOperator): - """This class is deprecated. - - Please use: - `airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/operators/wasb_delete_blob_operator.py b/airflow/contrib/operators/wasb_delete_blob_operator.py deleted file mode 100644 index cbf11b38fbf86..0000000000000 --- a/airflow/contrib/operators/wasb_delete_blob_operator.py +++ /dev/null @@ -1,31 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.microsoft.azure.operators.wasb_delete_blob`. -""" - -import warnings - -from airflow.providers.microsoft.azure.operators.wasb_delete_blob import WasbDeleteBlobOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.operators.wasb_delete_blob`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/operators/winrm_operator.py b/airflow/contrib/operators/winrm_operator.py deleted file mode 100644 index fcc6213e71d6e..0000000000000 --- a/airflow/contrib/operators/winrm_operator.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.winrm.operators.winrm`.""" - -import warnings - -from airflow.providers.microsoft.winrm.operators.winrm import WinRMOperator # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.winrm.operators.winrm`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/secrets/__init__.py b/airflow/contrib/secrets/__init__.py index 31cf12a8e38db..f0b87b5b84c68 100644 --- a/airflow/contrib/secrets/__init__.py +++ b/airflow/contrib/secrets/__init__.py @@ -16,3 +16,32 @@ # specific language governing permissions and limitations # under the License. """This package is deprecated. Please use `airflow.secrets` or `airflow.providers.*.secrets`.""" +import warnings + +from airflow.utils.deprecation_tools import add_deprecated_classes + +warnings.warn( + "This module is deprecated. Please use airflow.providers.*.secrets.", DeprecationWarning, stacklevel=2 +) + +__deprecated_classes = { + 'aws_secrets_manager': { + 'SecretsManagerBackend': 'airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend', + }, + 'aws_systems_manager': { + 'SystemsManagerParameterStoreBackend': + 'airflow.providers.amazon.aws.secrets.systems_manager.SystemsManagerParameterStoreBackend', + }, + 'azure_key_vault': { + 'AzureKeyVaultBackend': 'airflow.providers.microsoft.azure.secrets.key_vault.AzureKeyVaultBackend', + }, + 'gcp_secrets_manager': { + 'CloudSecretManagerBackend': + 'airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend', + }, + 'hashicorp_vault': { + 'VaultBackend': 'airflow.providers.hashicorp.secrets.vault.VaultBackend', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/secrets/aws_secrets_manager.py b/airflow/contrib/secrets/aws_secrets_manager.py deleted file mode 100644 index 833b03a59b06c..0000000000000 --- a/airflow/contrib/secrets/aws_secrets_manager.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.secrets.secrets_manager`.""" - -import warnings - -from airflow.providers.amazon.aws.secrets.secrets_manager import SecretsManagerBackend # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.secrets.secrets_manager`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/secrets/aws_systems_manager.py b/airflow/contrib/secrets/aws_systems_manager.py deleted file mode 100644 index 4c7a30cf05ab7..0000000000000 --- a/airflow/contrib/secrets/aws_systems_manager.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.secrets.systems_manager`.""" - -import warnings - -from airflow.providers.amazon.aws.secrets.systems_manager import SystemsManagerParameterStoreBackend # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.secrets.systems_manager`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/secrets/azure_key_vault.py b/airflow/contrib/secrets/azure_key_vault.py deleted file mode 100644 index 000ae92b3ac28..0000000000000 --- a/airflow/contrib/secrets/azure_key_vault.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.secrets.key_vault`.""" - -import warnings - -from airflow.providers.microsoft.azure.secrets.key_vault import AzureKeyVaultBackend # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.secrets.key_vault`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/secrets/gcp_secrets_manager.py b/airflow/contrib/secrets/gcp_secrets_manager.py deleted file mode 100644 index 7caa7ea2e88a7..0000000000000 --- a/airflow/contrib/secrets/gcp_secrets_manager.py +++ /dev/null @@ -1,45 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.secrets.secret_manager`.""" - -import warnings - -from airflow.providers.google.cloud.secrets.secret_manager import CloudSecretManagerBackend - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.secrets.secret_manager`.", - DeprecationWarning, - stacklevel=2, -) - - -class CloudSecretsManagerBackend(CloudSecretManagerBackend): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/secrets/hashicorp_vault.py b/airflow/contrib/secrets/hashicorp_vault.py deleted file mode 100644 index a3158d5d03abf..0000000000000 --- a/airflow/contrib/secrets/hashicorp_vault.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.hashicorp.secrets.vault`.""" - -import warnings - -from airflow.providers.hashicorp.secrets.vault import VaultBackend # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.hashicorp.secrets.vault`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/__init__.py b/airflow/contrib/sensors/__init__.py index de90d6c210596..23ebd67aaaf9e 100644 --- a/airflow/contrib/sensors/__init__.py +++ b/airflow/contrib/sensors/__init__.py @@ -19,8 +19,121 @@ import warnings +from airflow.utils.deprecation_tools import add_deprecated_classes + warnings.warn( "This package is deprecated. Please use `airflow.sensors` or `airflow.providers.*.sensors`.", DeprecationWarning, stacklevel=2, ) + +__deprecated_classes = { + 'aws_athena_sensor': { + 'AthenaSensor': 'airflow.providers.amazon.aws.sensors.athena.AthenaSensor', + }, + 'aws_glue_catalog_partition_sensor': { + 'AwsGlueCatalogPartitionSensor': + 'airflow.providers.amazon.aws.sensors.glue_catalog_partition.GlueCatalogPartitionSensor', + }, + 'aws_redshift_cluster_sensor': { + 'AwsRedshiftClusterSensor': + 'airflow.providers.amazon.aws.sensors.redshift_cluster.RedshiftClusterSensor', + }, + 'aws_sqs_sensor': { + 'SqsSensor': 'airflow.providers.amazon.aws.sensors.sqs.SqsSensor', + }, + 'azure_cosmos_sensor': { + 'AzureCosmosDocumentSensor': + 'airflow.providers.microsoft.azure.sensors.cosmos.AzureCosmosDocumentSensor', + }, + 'bash_sensor': { + 'STDOUT': 'airflow.sensors.bash.STDOUT', + 'BashSensor': 'airflow.sensors.bash.BashSensor', + 'Popen': 'airflow.sensors.bash.Popen', + 'TemporaryDirectory': 'airflow.sensors.bash.TemporaryDirectory', + 'gettempdir': 'airflow.sensors.bash.gettempdir', + }, + 'bigquery_sensor': { + 'BigQueryTableExistenceSensor': + 'airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor', + }, + 'cassandra_record_sensor': { + 'CassandraRecordSensor': 'airflow.providers.apache.cassandra.sensors.record.CassandraRecordSensor', + }, + 'cassandra_table_sensor': { + 'CassandraTableSensor': 'airflow.providers.apache.cassandra.sensors.table.CassandraTableSensor', + }, + 'celery_queue_sensor': { + 'CeleryQueueSensor': 'airflow.providers.celery.sensors.celery_queue.CeleryQueueSensor', + }, + 'datadog_sensor': { + 'DatadogSensor': 'airflow.providers.datadog.sensors.datadog.DatadogSensor', + }, + 'file_sensor': { + 'FileSensor': 'airflow.sensors.filesystem.FileSensor', + }, + 'ftp_sensor': { + 'FTPSensor': 'airflow.providers.ftp.sensors.ftp.FTPSensor', + 'FTPSSensor': 'airflow.providers.ftp.sensors.ftp.FTPSSensor', + }, + 'gcp_transfer_sensor': { + 'CloudDataTransferServiceJobStatusSensor': + 'airflow.providers.google.cloud.sensors.cloud_storage_transfer_service.' + 'CloudDataTransferServiceJobStatusSensor', + }, + 'gcs_sensor': { + 'GCSObjectExistenceSensor': 'airflow.providers.google.cloud.sensors.gcs.GCSObjectExistenceSensor', + 'GCSObjectsWithPrefixExistenceSensor': + 'airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor', + 'GCSObjectUpdateSensor': 'airflow.providers.google.cloud.sensors.gcs.GCSObjectUpdateSensor', + 'GCSUploadSessionCompleteSensor': + 'airflow.providers.google.cloud.sensors.gcs.GCSUploadSessionCompleteSensor', + }, + 'hdfs_sensor': { + 'HdfsFolderSensor': 'airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor', + 'HdfsRegexSensor': 'airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor', + }, + 'imap_attachment_sensor': { + 'ImapAttachmentSensor': 'airflow.providers.imap.sensors.imap_attachment.ImapAttachmentSensor', + }, + 'jira_sensor': { + 'JiraSensor': 'airflow.providers.atlassian.jira.sensors.jira.JiraSensor', + 'JiraTicketSensor': 'airflow.providers.atlassian.jira.sensors.jira.JiraTicketSensor', + }, + 'mongo_sensor': { + 'MongoSensor': 'airflow.providers.mongo.sensors.mongo.MongoSensor', + }, + 'pubsub_sensor': { + 'PubSubPullSensor': 'airflow.providers.google.cloud.sensors.pubsub.PubSubPullSensor', + }, + 'python_sensor': { + 'PythonSensor': 'airflow.sensors.python.PythonSensor', + }, + 'qubole_sensor': { + 'QuboleFileSensor': 'airflow.providers.qubole.sensors.qubole.QuboleFileSensor', + 'QubolePartitionSensor': 'airflow.providers.qubole.sensors.qubole.QubolePartitionSensor', + 'QuboleSensor': 'airflow.providers.qubole.sensors.qubole.QuboleSensor', + }, + 'redis_key_sensor': { + 'RedisKeySensor': 'airflow.providers.redis.sensors.redis_key.RedisKeySensor', + }, + 'redis_pub_sub_sensor': { + 'RedisPubSubSensor': 'airflow.providers.redis.sensors.redis_pub_sub.RedisPubSubSensor', + }, + 'sagemaker_training_sensor': { + 'SageMakerHook': 'airflow.providers.amazon.aws.sensors.sagemaker.SageMakerHook', + 'SageMakerTrainingSensor': 'airflow.providers.amazon.aws.sensors.sagemaker.SageMakerTrainingSensor', + }, + 'sftp_sensor': { + 'SFTPSensor': 'airflow.providers.sftp.sensors.sftp.SFTPSensor', + }, + 'wasb_sensor': { + 'WasbBlobSensor': 'airflow.providers.microsoft.azure.sensors.wasb.WasbBlobSensor', + 'WasbPrefixSensor': 'airflow.providers.microsoft.azure.sensors.wasb.WasbPrefixSensor', + }, + 'weekday_sensor': { + 'DayOfWeekSensor': 'airflow.sensors.weekday.DayOfWeekSensor', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/sensors/aws_athena_sensor.py b/airflow/contrib/sensors/aws_athena_sensor.py deleted file mode 100644 index ddffc38bb63e8..0000000000000 --- a/airflow/contrib/sensors/aws_athena_sensor.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.athena`.""" - -import warnings - -from airflow.providers.amazon.aws.sensors.athena import AthenaSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.athena`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/aws_glue_catalog_partition_sensor.py b/airflow/contrib/sensors/aws_glue_catalog_partition_sensor.py deleted file mode 100644 index 42a3795a56cae..0000000000000 --- a/airflow/contrib/sensors/aws_glue_catalog_partition_sensor.py +++ /dev/null @@ -1,33 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.amazon.aws.sensors.glue_catalog_partition`. -""" - -import warnings - -from airflow.providers.amazon.aws.sensors.glue_catalog_partition import ( # noqa - GlueCatalogPartitionSensor as AwsGlueCatalogPartitionSensor, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.glue_catalog_partition`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/aws_redshift_cluster_sensor.py b/airflow/contrib/sensors/aws_redshift_cluster_sensor.py deleted file mode 100644 index dc0da1372b400..0000000000000 --- a/airflow/contrib/sensors/aws_redshift_cluster_sensor.py +++ /dev/null @@ -1,33 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.redshift_cluster`.""" - -import warnings - -from airflow.providers.amazon.aws.sensors.redshift_cluster import ( - RedshiftClusterSensor as AwsRedshiftClusterSensor, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.redshift_cluster`.", - DeprecationWarning, - stacklevel=2, -) - -__all__ = ["AwsRedshiftClusterSensor"] diff --git a/airflow/contrib/sensors/aws_sqs_sensor.py b/airflow/contrib/sensors/aws_sqs_sensor.py deleted file mode 100644 index ed251f1ee9c22..0000000000000 --- a/airflow/contrib/sensors/aws_sqs_sensor.py +++ /dev/null @@ -1,45 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sqs`.""" - -import warnings - -from airflow.providers.amazon.aws.sensors.sqs import SqsSensor - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sqs`.", - DeprecationWarning, - stacklevel=2, -) - - -class SQSSensor(SqsSensor): - """ - This sensor is deprecated. - Please use :class:`airflow.providers.amazon.aws.sensors.sqs.SqsSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - "This class is deprecated. " - "Please use :class:`airflow.providers.amazon.aws.sensors.sqs.SqsSensor`.", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/sensors/azure_cosmos_sensor.py b/airflow/contrib/sensors/azure_cosmos_sensor.py deleted file mode 100644 index fc3df4f26615e..0000000000000 --- a/airflow/contrib/sensors/azure_cosmos_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.sensors.cosmos`.""" - -import warnings - -from airflow.providers.microsoft.azure.sensors.cosmos import AzureCosmosDocumentSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.sensors.cosmos`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/bash_sensor.py b/airflow/contrib/sensors/bash_sensor.py deleted file mode 100644 index c3d9c814696c7..0000000000000 --- a/airflow/contrib/sensors/bash_sensor.py +++ /dev/null @@ -1,26 +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. -"""This module is deprecated. Please use :mod:`airflow.sensors.bash`.""" - -import warnings - -from airflow.sensors.bash import STDOUT, BashSensor, Popen, TemporaryDirectory, gettempdir # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.sensors.bash`.", DeprecationWarning, stacklevel=2 -) diff --git a/airflow/contrib/sensors/bigquery_sensor.py b/airflow/contrib/sensors/bigquery_sensor.py deleted file mode 100644 index d58445e3d174b..0000000000000 --- a/airflow/contrib/sensors/bigquery_sensor.py +++ /dev/null @@ -1,44 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.sensors.bigquery`.""" - -import warnings - -from airflow.providers.google.cloud.sensors.bigquery import BigQueryTableExistenceSensor - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.sensors.bigquery`.", - DeprecationWarning, - stacklevel=2, -) - - -class BigQueryTableSensor(BigQueryTableExistenceSensor): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/sensors/cassandra_record_sensor.py b/airflow/contrib/sensors/cassandra_record_sensor.py deleted file mode 100644 index cfc3b30107ead..0000000000000 --- a/airflow/contrib/sensors/cassandra_record_sensor.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.apache.cassandra.sensors.record`.""" - -import warnings - -from airflow.providers.apache.cassandra.sensors.record import CassandraRecordSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.cassandra.sensors.record`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/cassandra_table_sensor.py b/airflow/contrib/sensors/cassandra_table_sensor.py deleted file mode 100644 index 0b7c7aa6eb73f..0000000000000 --- a/airflow/contrib/sensors/cassandra_table_sensor.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.apache.cassandra.sensors.table`.""" - -import warnings - -from airflow.providers.apache.cassandra.sensors.table import CassandraTableSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.cassandra.sensors.table`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/celery_queue_sensor.py b/airflow/contrib/sensors/celery_queue_sensor.py deleted file mode 100644 index 6ed2be1c93ac5..0000000000000 --- a/airflow/contrib/sensors/celery_queue_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.celery.sensors.celery_queue`.""" - -import warnings - -from airflow.providers.celery.sensors.celery_queue import CeleryQueueSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.celery.sensors.celery_queue`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/datadog_sensor.py b/airflow/contrib/sensors/datadog_sensor.py deleted file mode 100644 index d0377d11a8889..0000000000000 --- a/airflow/contrib/sensors/datadog_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.datadog.sensors.datadog`.""" - -import warnings - -from airflow.providers.datadog.sensors.datadog import DatadogSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.datadog.sensors.datadog`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/emr_base_sensor.py b/airflow/contrib/sensors/emr_base_sensor.py deleted file mode 100644 index d100e95ca2c04..0000000000000 --- a/airflow/contrib/sensors/emr_base_sensor.py +++ /dev/null @@ -1,31 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.emr import EmrBaseSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.emr_base import EmrBaseSensor # type: ignore[no-redef] # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/emr_job_flow_sensor.py b/airflow/contrib/sensors/emr_job_flow_sensor.py deleted file mode 100644 index 8c2365ec99e26..0000000000000 --- a/airflow/contrib/sensors/emr_job_flow_sensor.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.emr import EmrJobFlowSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.emr_job_flow import ( # type: ignore[no-redef] # noqa - EmrJobFlowSensor, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/emr_step_sensor.py b/airflow/contrib/sensors/emr_step_sensor.py deleted file mode 100644 index 2dd2e704067e7..0000000000000 --- a/airflow/contrib/sensors/emr_step_sensor.py +++ /dev/null @@ -1,31 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.emr import EmrStepSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.emr_step import EmrStepSensor # type: ignore[no-redef] # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/file_sensor.py b/airflow/contrib/sensors/file_sensor.py deleted file mode 100644 index 6d75b657e6cef..0000000000000 --- a/airflow/contrib/sensors/file_sensor.py +++ /dev/null @@ -1,26 +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. -"""This module is deprecated. Please use :mod:`airflow.sensors.filesystem`.""" - -import warnings - -from airflow.sensors.filesystem import FileSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.sensors.filesystem`.", DeprecationWarning, stacklevel=2 -) diff --git a/airflow/contrib/sensors/ftp_sensor.py b/airflow/contrib/sensors/ftp_sensor.py deleted file mode 100644 index 76c47c4609854..0000000000000 --- a/airflow/contrib/sensors/ftp_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.ftp.sensors.ftp`.""" - -import warnings - -from airflow.providers.ftp.sensors.ftp import FTPSensor, FTPSSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.ftp.sensors.ftp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/gcp_transfer_sensor.py b/airflow/contrib/sensors/gcp_transfer_sensor.py deleted file mode 100644 index 429ddb1a44b05..0000000000000 --- a/airflow/contrib/sensors/gcp_transfer_sensor.py +++ /dev/null @@ -1,51 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.sensors.cloud_storage_transfer_service`. -""" - -import warnings - -from airflow.providers.google.cloud.sensors.cloud_storage_transfer_service import ( - CloudDataTransferServiceJobStatusSensor, -) - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.google.cloud.sensors.cloud_storage_transfer_service`.", - DeprecationWarning, - stacklevel=2, -) - - -class GCPTransferServiceWaitForJobStatusSensor(CloudDataTransferServiceJobStatusSensor): - """This class is deprecated. - - Please use `airflow.providers.google.cloud.sensors.transfer.CloudDataTransferServiceJobStatusSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.google.cloud.sensors.transfer.CloudDataTransferServiceJobStatusSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/sensors/gcs_sensor.py b/airflow/contrib/sensors/gcs_sensor.py deleted file mode 100644 index 3df15f676c265..0000000000000 --- a/airflow/contrib/sensors/gcs_sensor.py +++ /dev/null @@ -1,97 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.sensors.gcs`.""" - -import warnings - -from airflow.providers.google.cloud.sensors.gcs import ( - GCSObjectExistenceSensor, - GCSObjectsWithPrefixExistenceSensor, - GCSObjectUpdateSensor, - GCSUploadSessionCompleteSensor, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.sensors.gcs`.", - DeprecationWarning, - stacklevel=2, -) - - -class GoogleCloudStorageObjectSensor(GCSObjectExistenceSensor): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectExistenceSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectExistenceSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GoogleCloudStorageObjectUpdatedSensor(GCSObjectUpdateSensor): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectUpdateSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectUpdateSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GoogleCloudStoragePrefixSensor(GCSObjectsWithPrefixExistenceSensor): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class GoogleCloudStorageUploadSessionCompleteSensor(GCSUploadSessionCompleteSensor): - """ - This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSUploadSessionCompleteSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use `airflow.providers.google.cloud.sensors.gcs.GCSUploadSessionCompleteSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/sensors/hdfs_sensor.py b/airflow/contrib/sensors/hdfs_sensor.py deleted file mode 100644 index d71ec8fc2f454..0000000000000 --- a/airflow/contrib/sensors/hdfs_sensor.py +++ /dev/null @@ -1,67 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.apache.hdfs.sensors.hdfs`. -""" - -import warnings - -from airflow.providers.apache.hdfs.sensors.hdfs import HdfsFolderSensor, HdfsRegexSensor - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.apache.hdfs.sensors.hdfs`.", - DeprecationWarning, - stacklevel=2, -) - - -class HdfsSensorFolder(HdfsFolderSensor): - """This class is deprecated. - - Please use: - `airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class HdfsSensorRegex(HdfsRegexSensor): - """This class is deprecated. - - Please use: - `airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor`. - """ - - def __init__(self, *args, **kwargs): - warnings.warn( - """This class is deprecated. - Please use - `airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor`.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) diff --git a/airflow/contrib/sensors/imap_attachment_sensor.py b/airflow/contrib/sensors/imap_attachment_sensor.py deleted file mode 100644 index 34d2d7f1402e8..0000000000000 --- a/airflow/contrib/sensors/imap_attachment_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.imap.sensors.imap_attachment`.""" - -import warnings - -from airflow.providers.imap.sensors.imap_attachment import ImapAttachmentSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.imap.sensors.imap_attachment`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/jira_sensor.py b/airflow/contrib/sensors/jira_sensor.py deleted file mode 100644 index 6c71ba889b588..0000000000000 --- a/airflow/contrib/sensors/jira_sensor.py +++ /dev/null @@ -1,29 +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. - -"""This module is deprecated. Please use :mod:`airflow.providers.atlassian.jira.sensors.jira`.""" - -import warnings - -from airflow.providers.atlassian.jira.sensors.jira import JiraSensor, JiraTicketSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.atlassian.jira.sensors.jira`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/mongo_sensor.py b/airflow/contrib/sensors/mongo_sensor.py deleted file mode 100644 index 13a5f0b65af4c..0000000000000 --- a/airflow/contrib/sensors/mongo_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.mongo.sensors.mongo`.""" - -import warnings - -from airflow.providers.mongo.sensors.mongo import MongoSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.mongo.sensors.mongo`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/pubsub_sensor.py b/airflow/contrib/sensors/pubsub_sensor.py deleted file mode 100644 index eea404e216995..0000000000000 --- a/airflow/contrib/sensors/pubsub_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.sensors.pubsub`.""" - -import warnings - -from airflow.providers.google.cloud.sensors.pubsub import PubSubPullSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.sensors.pubsub`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/python_sensor.py b/airflow/contrib/sensors/python_sensor.py deleted file mode 100644 index bc7543c2fd372..0000000000000 --- a/airflow/contrib/sensors/python_sensor.py +++ /dev/null @@ -1,26 +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. -"""This module is deprecated. Please use :mod:`airflow.sensors.python`.""" - -import warnings - -from airflow.sensors.python import PythonSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.sensors.python`.", DeprecationWarning, stacklevel=2 -) diff --git a/airflow/contrib/sensors/qubole_sensor.py b/airflow/contrib/sensors/qubole_sensor.py deleted file mode 100644 index 6b656249003e9..0000000000000 --- a/airflow/contrib/sensors/qubole_sensor.py +++ /dev/null @@ -1,32 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.qubole.sensors.qubole`.""" - -import warnings - -from airflow.providers.qubole.sensors.qubole import ( # noqa - QuboleFileSensor, - QubolePartitionSensor, - QuboleSensor, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.qubole.sensors.qubole`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/redis_key_sensor.py b/airflow/contrib/sensors/redis_key_sensor.py deleted file mode 100644 index f500c86dac5f3..0000000000000 --- a/airflow/contrib/sensors/redis_key_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.redis.sensors.redis_key`.""" - -import warnings - -from airflow.providers.redis.sensors.redis_key import RedisKeySensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.redis.sensors.redis_key`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/redis_pub_sub_sensor.py b/airflow/contrib/sensors/redis_pub_sub_sensor.py deleted file mode 100644 index 16946ac40d198..0000000000000 --- a/airflow/contrib/sensors/redis_pub_sub_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.redis.sensors.redis_pub_sub`.""" - -import warnings - -from airflow.providers.redis.sensors.redis_pub_sub import RedisPubSubSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.redis.sensors.redis_pub_sub`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/sagemaker_base_sensor.py b/airflow/contrib/sensors/sagemaker_base_sensor.py deleted file mode 100644 index 14ce0d88e57f8..0000000000000 --- a/airflow/contrib/sensors/sagemaker_base_sensor.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.sagemaker import SageMakerBaseSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.sagemaker_base import ( # type: ignore[no-redef] # noqa - SageMakerBaseSensor, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/sagemaker_endpoint_sensor.py b/airflow/contrib/sensors/sagemaker_endpoint_sensor.py deleted file mode 100644 index e5a146a06c082..0000000000000 --- a/airflow/contrib/sensors/sagemaker_endpoint_sensor.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.sagemaker import SageMakerEndpointSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.sagemaker_endpoint import ( # type: ignore[no-redef] # noqa - SageMakerEndpointSensor, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/sagemaker_training_sensor.py b/airflow/contrib/sensors/sagemaker_training_sensor.py deleted file mode 100644 index 6a56516042a6f..0000000000000 --- a/airflow/contrib/sensors/sagemaker_training_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker`.""" - -import warnings - -from airflow.providers.amazon.aws.sensors.sagemaker import SageMakerHook, SageMakerTrainingSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/sagemaker_transform_sensor.py b/airflow/contrib/sensors/sagemaker_transform_sensor.py deleted file mode 100644 index 51723947ef725..0000000000000 --- a/airflow/contrib/sensors/sagemaker_transform_sensor.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.sagemaker import SageMakerTransformSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.sagemaker_transform import ( # type: ignore[no-redef] # noqa - SageMakerTransformSensor, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/sagemaker_tuning_sensor.py b/airflow/contrib/sensors/sagemaker_tuning_sensor.py deleted file mode 100644 index da6701f00deed..0000000000000 --- a/airflow/contrib/sensors/sagemaker_tuning_sensor.py +++ /dev/null @@ -1,33 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker`.""" - -import warnings - -try: - from airflow.providers.amazon.aws.sensors.sagemaker import SageMakerTuningSensor -except ImportError: - from airflow.providers.amazon.aws.sensors.sagemaker_tuning import ( # type: ignore[no-redef] # noqa - SageMakerTuningSensor, - ) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/sftp_sensor.py b/airflow/contrib/sensors/sftp_sensor.py deleted file mode 100644 index d2700e814295a..0000000000000 --- a/airflow/contrib/sensors/sftp_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.sftp.sensors.sftp`.""" - -import warnings - -from airflow.providers.sftp.sensors.sftp import SFTPSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.sftp.sensors.sftp`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/wasb_sensor.py b/airflow/contrib/sensors/wasb_sensor.py deleted file mode 100644 index d8e0748907afe..0000000000000 --- a/airflow/contrib/sensors/wasb_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.sensors.wasb`.""" - -import warnings - -from airflow.providers.microsoft.azure.sensors.wasb import WasbBlobSensor, WasbPrefixSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.microsoft.azure.sensors.wasb`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/sensors/weekday_sensor.py b/airflow/contrib/sensors/weekday_sensor.py deleted file mode 100644 index 1f836e1dda936..0000000000000 --- a/airflow/contrib/sensors/weekday_sensor.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.sensors.weekday`.""" - -import warnings - -from airflow.sensors.weekday import DayOfWeekSensor # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.sensors.weekday`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/task_runner/__init__.py b/airflow/contrib/task_runner/__init__.py index 77842e3dc5b4c..069e2c4613822 100644 --- a/airflow/contrib/task_runner/__init__.py +++ b/airflow/contrib/task_runner/__init__.py @@ -16,3 +16,18 @@ # specific language governing permissions and limitations # under the License. """This package is deprecated. Please use `airflow.task.task_runner`.""" +import warnings + +from airflow.utils.deprecation_tools import add_deprecated_classes + +warnings.warn( + "This module is deprecated. Please use airflow.task.task_runner.", DeprecationWarning, stacklevel=2 +) + +__deprecated_classes = { + 'cgroup_task_runner': { + 'CgroupTaskRunner': 'airflow.task.task_runner.cgroup_task_runner.CgroupTaskRunner', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/task_runner/cgroup_task_runner.py b/airflow/contrib/task_runner/cgroup_task_runner.py deleted file mode 100644 index f923126fe4475..0000000000000 --- a/airflow/contrib/task_runner/cgroup_task_runner.py +++ /dev/null @@ -1,28 +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. -"""This module is deprecated. Please use :mod:`airflow.task.task_runner.cgroup_task_runner`.""" - -import warnings - -from airflow.task.task_runner.cgroup_task_runner import CgroupTaskRunner # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.task.task_runner.cgroup_task_runner`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/utils/__init__.py b/airflow/contrib/utils/__init__.py index 4e6cbb7d51e23..c9116403e9938 100644 --- a/airflow/contrib/utils/__init__.py +++ b/airflow/contrib/utils/__init__.py @@ -19,4 +19,287 @@ import warnings +from airflow.utils.deprecation_tools import add_deprecated_classes + warnings.warn("This module is deprecated. Please use `airflow.utils`.", DeprecationWarning, stacklevel=2) + +__deprecated_classes = { + 'aws_athena_hook': { + 'AWSAthenaHook': 'airflow.providers.amazon.aws.hooks.athena.AthenaHook', + }, + 'aws_datasync_hook': { + 'AWSDataSyncHook': 'airflow.providers.amazon.aws.hooks.datasync.DataSyncHook', + }, + 'aws_dynamodb_hook': { + 'AwsDynamoDBHook': 'airflow.providers.amazon.aws.hooks.dynamodb.DynamoDBHook', + }, + 'aws_firehose_hook': { + 'FirehoseHook': 'airflow.providers.amazon.aws.hooks.kinesis.FirehoseHook', + }, + 'aws_glue_catalog_hook': { + 'AwsGlueCatalogHook': 'airflow.providers.amazon.aws.hooks.glue_catalog.GlueCatalogHook', + }, + 'aws_hook': { + 'AwsBaseHook': 'airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook', + '_parse_s3_config': 'airflow.providers.amazon.aws.hooks.base_aws._parse_s3_config', + 'boto3': 'airflow.providers.amazon.aws.hooks.base_aws.boto3', + }, + 'aws_lambda_hook': { + 'AwsLambdaHook': 'airflow.providers.amazon.aws.hooks.lambda_function.LambdaHook', + }, + 'aws_logs_hook': { + 'AwsLogsHook': 'airflow.providers.amazon.aws.hooks.logs.AwsLogsHook', + }, + 'aws_sns_hook': { + 'AwsSnsHook': 'airflow.providers.amazon.aws.hooks.sns.SnsHook', + }, + 'aws_sqs_hook': { + 'SqsHook': 'airflow.providers.amazon.aws.hooks.sqs.SqsHook', + }, + 'azure_container_instance_hook': { + 'AzureContainerInstanceHook': + 'airflow.providers.microsoft.azure.hooks.container_instance.AzureContainerInstanceHook', + }, + 'azure_container_registry_hook': { + 'AzureContainerRegistryHook': + 'airflow.providers.microsoft.azure.hooks.container_registry.AzureContainerRegistryHook', + }, + 'azure_container_volume_hook': { + 'AzureContainerVolumeHook': + 'airflow.providers.microsoft.azure.hooks.container_volume.AzureContainerVolumeHook', + }, + 'azure_cosmos_hook': { + 'AzureCosmosDBHook': 'airflow.providers.microsoft.azure.hooks.cosmos.AzureCosmosDBHook', + }, + 'azure_data_lake_hook': { + 'AzureDataLakeHook': 'airflow.providers.microsoft.azure.hooks.data_lake.AzureDataLakeHook', + }, + 'azure_fileshare_hook': { + 'AzureFileShareHook': 'airflow.providers.microsoft.azure.hooks.fileshare.AzureFileShareHook', + }, + 'bigquery_hook': { + 'BigQueryBaseCursor': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryBaseCursor', + 'BigQueryConnection': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryConnection', + 'BigQueryCursor': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryCursor', + 'BigQueryHook': 'airflow.providers.google.cloud.hooks.bigquery.BigQueryHook', + 'GbqConnector': 'airflow.providers.google.cloud.hooks.bigquery.GbqConnector', + }, + 'cassandra_hook': { + 'CassandraHook': 'airflow.providers.apache.cassandra.hooks.cassandra.CassandraHook', + }, + 'cloudant_hook': { + 'CloudantHook': 'airflow.providers.cloudant.hooks.cloudant.CloudantHook', + }, + 'databricks_hook': { + 'CANCEL_RUN_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.CANCEL_RUN_ENDPOINT', + 'GET_RUN_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.GET_RUN_ENDPOINT', + 'RESTART_CLUSTER_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.RESTART_CLUSTER_ENDPOINT', + 'RUN_LIFE_CYCLE_STATES': 'airflow.providers.databricks.hooks.databricks.RUN_LIFE_CYCLE_STATES', + 'RUN_NOW_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.RUN_NOW_ENDPOINT', + 'START_CLUSTER_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.START_CLUSTER_ENDPOINT', + 'SUBMIT_RUN_ENDPOINT': 'airflow.providers.databricks.hooks.databricks.SUBMIT_RUN_ENDPOINT', + 'TERMINATE_CLUSTER_ENDPOINT': + 'airflow.providers.databricks.hooks.databricks.TERMINATE_CLUSTER_ENDPOINT', + 'DatabricksHook': 'airflow.providers.databricks.hooks.databricks.DatabricksHook', + 'RunState': 'airflow.providers.databricks.hooks.databricks.RunState', + }, + 'datadog_hook': { + 'DatadogHook': 'airflow.providers.datadog.hooks.datadog.DatadogHook', + }, + 'datastore_hook': { + 'DatastoreHook': 'airflow.providers.google.cloud.hooks.datastore.DatastoreHook', + }, + 'dingding_hook': { + 'DingdingHook': 'airflow.providers.dingding.hooks.dingding.DingdingHook', + 'requests': 'airflow.providers.dingding.hooks.dingding.requests', + }, + 'discord_webhook_hook': { + 'DiscordWebhookHook': 'airflow.providers.discord.hooks.discord_webhook.DiscordWebhookHook', + }, + 'emr_hook': { + 'EmrHook': 'airflow.providers.amazon.aws.hooks.emr.EmrHook', + }, + 'fs_hook': { + 'FSHook': 'airflow.hooks.filesystem.FSHook', + }, + 'ftp_hook': { + 'FTPHook': 'airflow.providers.ftp.hooks.ftp.FTPHook', + 'FTPSHook': 'airflow.providers.ftp.hooks.ftp.FTPSHook', + }, + 'gcp_api_base_hook': { + 'GoogleBaseHook': 'airflow.providers.google.common.hooks.base_google.GoogleBaseHook', + }, + 'gcp_bigtable_hook': { + 'BigtableHook': 'airflow.providers.google.cloud.hooks.bigtable.BigtableHook', + }, + 'gcp_cloud_build_hook': { + 'CloudBuildHook': 'airflow.providers.google.cloud.hooks.cloud_build.CloudBuildHook', + }, + 'gcp_compute_hook': { + 'ComputeEngineHook': 'airflow.providers.google.cloud.hooks.compute.ComputeEngineHook', + }, + 'gcp_container_hook': { + 'GKEHook': 'airflow.providers.google.cloud.hooks.kubernetes_engine.GKEHook', + }, + 'gcp_dataflow_hook': { + 'DataflowHook': 'airflow.providers.google.cloud.hooks.dataflow.DataflowHook', + }, + 'gcp_dataproc_hook': { + 'DataprocHook': 'airflow.providers.google.cloud.hooks.dataproc.DataprocHook', + }, + 'gcp_dlp_hook': { + 'CloudDLPHook': 'airflow.providers.google.cloud.hooks.dlp.CloudDLPHook', + 'DlpJob': 'airflow.providers.google.cloud.hooks.dlp.DlpJob', + }, + 'gcp_function_hook': { + 'CloudFunctionsHook': 'airflow.providers.google.cloud.hooks.functions.CloudFunctionsHook', + }, + 'gcp_kms_hook': { + 'CloudKMSHook': 'airflow.providers.google.cloud.hooks.kms.CloudKMSHook', + }, + 'gcp_mlengine_hook': { + 'MLEngineHook': 'airflow.providers.google.cloud.hooks.mlengine.MLEngineHook', + }, + 'gcp_natural_language_hook': { + 'CloudNaturalLanguageHook': + 'airflow.providers.google.cloud.hooks.natural_language.CloudNaturalLanguageHook', + }, + 'gcp_pubsub_hook': { + 'PubSubException': 'airflow.providers.google.cloud.hooks.pubsub.PubSubException', + 'PubSubHook': 'airflow.providers.google.cloud.hooks.pubsub.PubSubHook', + }, + 'gcp_spanner_hook': { + 'SpannerHook': 'airflow.providers.google.cloud.hooks.spanner.SpannerHook', + }, + 'gcp_speech_to_text_hook': { + 'CloudSpeechToTextHook': 'airflow.providers.google.cloud.hooks.speech_to_text.CloudSpeechToTextHook', + }, + 'gcp_sql_hook': { + 'CloudSQLDatabaseHook': 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook', + 'CloudSQLHook': 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLHook', + }, + 'gcp_tasks_hook': { + 'CloudTasksHook': 'airflow.providers.google.cloud.hooks.tasks.CloudTasksHook', + }, + 'gcp_text_to_speech_hook': { + 'CloudTextToSpeechHook': 'airflow.providers.google.cloud.hooks.text_to_speech.CloudTextToSpeechHook', + }, + 'gcp_transfer_hook': { + 'CloudDataTransferServiceHook': + 'airflow.providers.google.cloud.hooks.cloud_storage_transfer_service.' + 'CloudDataTransferServiceHook', + }, + 'gcp_translate_hook': { + 'CloudTranslateHook': 'airflow.providers.google.cloud.hooks.translate.CloudTranslateHook', + }, + 'gcp_video_intelligence_hook': { + 'CloudVideoIntelligenceHook': + 'airflow.providers.google.cloud.hooks.video_intelligence.CloudVideoIntelligenceHook', + }, + 'gcp_vision_hook': { + 'CloudVisionHook': 'airflow.providers.google.cloud.hooks.vision.CloudVisionHook', + }, + 'gcs_hook': { + 'GCSHook': 'airflow.providers.google.cloud.hooks.gcs.GCSHook', + }, + 'gdrive_hook': { + 'GoogleDriveHook': 'airflow.providers.google.suite.hooks.drive.GoogleDriveHook', + }, + 'grpc_hook': { + 'GrpcHook': 'airflow.providers.grpc.hooks.grpc.GrpcHook', + }, + 'imap_hook': { + 'ImapHook': 'airflow.providers.imap.hooks.imap.ImapHook', + 'Mail': 'airflow.providers.imap.hooks.imap.Mail', + 'MailPart': 'airflow.providers.imap.hooks.imap.MailPart', + }, + 'jenkins_hook': { + 'JenkinsHook': 'airflow.providers.jenkins.hooks.jenkins.JenkinsHook', + }, + 'jira_hook': { + 'JiraHook': 'airflow.providers.atlassian.jira.hooks.jira.JiraHook', + }, + 'mongo_hook': { + 'MongoHook': 'airflow.providers.mongo.hooks.mongo.MongoHook', + }, + 'openfaas_hook': { + 'OK_STATUS_CODE': 'airflow.providers.openfaas.hooks.openfaas.OK_STATUS_CODE', + 'OpenFaasHook': 'airflow.providers.openfaas.hooks.openfaas.OpenFaasHook', + 'requests': 'airflow.providers.openfaas.hooks.openfaas.requests', + }, + 'opsgenie_alert_hook': { + 'OpsgenieAlertHook': 'airflow.providers.opsgenie.hooks.opsgenie.OpsgenieAlertHook', + }, + 'pagerduty_hook': { + 'PagerdutyHook': 'airflow.providers.pagerduty.hooks.pagerduty.PagerdutyHook', + }, + 'pinot_hook': { + 'PinotAdminHook': 'airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook', + 'PinotDbApiHook': 'airflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook', + }, + 'qubole_check_hook': { + 'QuboleCheckHook': 'airflow.providers.qubole.hooks.qubole_check.QuboleCheckHook', + }, + 'qubole_hook': { + 'QuboleHook': 'airflow.providers.qubole.hooks.qubole.QuboleHook', + }, + 'redis_hook': { + 'RedisHook': 'airflow.providers.redis.hooks.redis.RedisHook', + }, + 'redshift_hook': { + 'RedshiftHook': 'airflow.providers.amazon.aws.hooks.redshift_cluster.RedshiftHook', + }, + 'sagemaker_hook': { + 'LogState': 'airflow.providers.amazon.aws.hooks.sagemaker.LogState', + 'Position': 'airflow.providers.amazon.aws.hooks.sagemaker.Position', + 'SageMakerHook': 'airflow.providers.amazon.aws.hooks.sagemaker.SageMakerHook', + 'argmin': 'airflow.providers.amazon.aws.hooks.sagemaker.argmin', + 'secondary_training_status_changed': + 'airflow.providers.amazon.aws.hooks.sagemaker.secondary_training_status_changed', + 'secondary_training_status_message': + 'airflow.providers.amazon.aws.hooks.sagemaker.secondary_training_status_message', + }, + 'salesforce_hook': { + 'SalesforceHook': 'airflow.providers.salesforce.hooks.salesforce.SalesforceHook', + 'pd': 'airflow.providers.salesforce.hooks.salesforce.pd', + }, + 'segment_hook': { + 'SegmentHook': 'airflow.providers.segment.hooks.segment.SegmentHook', + 'analytics': 'airflow.providers.segment.hooks.segment.analytics', + }, + 'sftp_hook': { + 'SFTPHook': 'airflow.providers.sftp.hooks.sftp.SFTPHook', + }, + 'slack_webhook_hook': { + 'SlackWebhookHook': 'airflow.providers.slack.hooks.slack_webhook.SlackWebhookHook', + }, + 'snowflake_hook': { + 'SnowflakeHook': 'airflow.providers.snowflake.hooks.snowflake.SnowflakeHook', + }, + 'spark_jdbc_hook': { + 'SparkJDBCHook': 'airflow.providers.apache.spark.hooks.spark_jdbc.SparkJDBCHook', + }, + 'spark_sql_hook': { + 'SparkSqlHook': 'airflow.providers.apache.spark.hooks.spark_sql.SparkSqlHook', + }, + 'spark_submit_hook': { + 'SparkSubmitHook': 'airflow.providers.apache.spark.hooks.spark_submit.SparkSubmitHook', + }, + 'sqoop_hook': { + 'SqoopHook': 'airflow.providers.apache.sqoop.hooks.sqoop.SqoopHook', + }, + 'ssh_hook': { + 'SSHHook': 'airflow.providers.ssh.hooks.ssh.SSHHook', + }, + 'vertica_hook': { + 'VerticaHook': 'airflow.providers.vertica.hooks.vertica.VerticaHook', + }, + 'wasb_hook': { + 'WasbHook': 'airflow.providers.microsoft.azure.hooks.wasb.WasbHook', + }, + 'winrm_hook': { + 'WinRMHook': 'airflow.providers.microsoft.winrm.hooks.winrm.WinRMHook', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/utils/gcp_field_sanitizer.py b/airflow/contrib/utils/gcp_field_sanitizer.py deleted file mode 100644 index 37c0aff2b76d6..0000000000000 --- a/airflow/contrib/utils/gcp_field_sanitizer.py +++ /dev/null @@ -1,31 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.utils.field_sanitizer`""" - -import warnings - -from airflow.providers.google.cloud.utils.field_sanitizer import ( # noqa - GcpBodyFieldSanitizer, - GcpFieldSanitizerException, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.utils.field_sanitizer`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/utils/gcp_field_validator.py b/airflow/contrib/utils/gcp_field_validator.py deleted file mode 100644 index fc42dca94be00..0000000000000 --- a/airflow/contrib/utils/gcp_field_validator.py +++ /dev/null @@ -1,32 +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. -"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.utils.field_validator`.""" - -import warnings - -from airflow.providers.google.cloud.utils.field_validator import ( # noqa - GcpBodyFieldValidator, - GcpFieldValidationException, - GcpValidationSpecificationException, -) - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.utils.field_validator`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/utils/log/__init__.py b/airflow/contrib/utils/log/__init__.py index ecc47d3d85122..174ce4b29890d 100644 --- a/airflow/contrib/utils/log/__init__.py +++ b/airflow/contrib/utils/log/__init__.py @@ -18,4 +18,15 @@ import warnings +from airflow.utils.deprecation_tools import add_deprecated_classes + warnings.warn("This module is deprecated. Please use `airflow.utils.log`.", DeprecationWarning, stacklevel=2) + +__deprecated_classes = { + 'task_handler_with_custom_formatter': { + 'TaskHandlerWithCustomFormatter': + 'airflow.utils.log.task_handler_with_custom_formatter.TaskHandlerWithCustomFormatter', + }, +} + +add_deprecated_classes(__deprecated_classes, __name__) diff --git a/airflow/contrib/utils/log/task_handler_with_custom_formatter.py b/airflow/contrib/utils/log/task_handler_with_custom_formatter.py deleted file mode 100644 index 9bbdee3b2c8c3..0000000000000 --- a/airflow/contrib/utils/log/task_handler_with_custom_formatter.py +++ /dev/null @@ -1,27 +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. -"""This module is deprecated. Please use :mod:`airflow.utils.log.task_handler_with_custom_formatter`.""" - -import warnings - -from airflow.utils.log.task_handler_with_custom_formatter import TaskHandlerWithCustomFormatter # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.utils.log.task_handler_with_custom_formatter`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/utils/mlengine_operator_utils.py b/airflow/contrib/utils/mlengine_operator_utils.py deleted file mode 100644 index ebd630c1912a2..0000000000000 --- a/airflow/contrib/utils/mlengine_operator_utils.py +++ /dev/null @@ -1,31 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.utils.mlengine_operator_utils`. -""" - -import warnings - -from airflow.providers.google.cloud.utils.mlengine_operator_utils import create_evaluate_ops # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.providers.google.cloud.utils.mlengine_operator_utils`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/utils/mlengine_prediction_summary.py b/airflow/contrib/utils/mlengine_prediction_summary.py deleted file mode 100644 index ea390525a359d..0000000000000 --- a/airflow/contrib/utils/mlengine_prediction_summary.py +++ /dev/null @@ -1,32 +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. -""" -This module is deprecated. -Please use :mod:`airflow.providers.google.cloud.utils.mlengine_prediction_summary`. -""" - -import warnings - -from airflow.providers.google.cloud.utils.mlengine_prediction_summary import JsonCoder, MakeSummary # noqa - -warnings.warn( - "This module is deprecated. " - "Please use `airflow.providers.google.cloud.utils.mlengine_prediction_summary`.", - DeprecationWarning, - stacklevel=2, -) diff --git a/airflow/contrib/utils/sendgrid.py b/airflow/contrib/utils/sendgrid.py deleted file mode 100644 index 16408f92d3a5a..0000000000000 --- a/airflow/contrib/utils/sendgrid.py +++ /dev/null @@ -1,36 +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. - -""" -This module is deprecated. -Please use `airflow.providers.sendgrid.utils.emailer`. -""" - -import warnings - -from airflow.utils.module_loading import import_string - - -def send_email(*args, **kwargs): - """This function is deprecated. Please use `airflow.providers.sendgrid.utils.emailer.send_email`.""" - warnings.warn( - "This function is deprecated. Please use `airflow.providers.sendgrid.utils.emailer.send_email`.", - DeprecationWarning, - stacklevel=2, - ) - return import_string('airflow.providers.sendgrid.utils.emailer.send_email')(*args, **kwargs) diff --git a/airflow/contrib/utils/weekday.py b/airflow/contrib/utils/weekday.py deleted file mode 100644 index 2f2448c8896da..0000000000000 --- a/airflow/contrib/utils/weekday.py +++ /dev/null @@ -1,24 +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. -"""This module is deprecated. Please use :mod:`airflow.utils.weekday`.""" -import warnings - -from airflow.utils.weekday import WeekDay # noqa - -warnings.warn( - "This module is deprecated. Please use `airflow.utils.weekday`.", DeprecationWarning, stacklevel=2 -) diff --git a/airflow/utils/deprecation_tools.py b/airflow/utils/deprecation_tools.py new file mode 100644 index 0000000000000..b6379a11cc609 --- /dev/null +++ b/airflow/utils/deprecation_tools.py @@ -0,0 +1,47 @@ +# 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. + +import functools +import importlib +import sys +import warnings +from types import ModuleType +from typing import Dict + + +def getattr_with_deprecation(imports: Dict[str, str], module: str, name: str): + target_class_full_name = imports.get(name) + if not target_class_full_name: + raise AttributeError(f"The module `{module!r}` has no attribute `{name!r}`") + warnings.warn( + f"The `{module}.{name}` class is deprecated. Please use `{target_class_full_name!r}`.", + DeprecationWarning, + stacklevel=2, + ) + new_module, new_class_name = target_class_full_name.rsplit('.', 1) + return getattr(importlib.import_module(new_module), new_class_name) + + +def add_deprecated_classes(module_imports: Dict[str, Dict[str, str]], package: str): + for module_name, imports in module_imports.items(): + full_module_name = f"{package}.{module_name}" + module_type = ModuleType(full_module_name) + # Mypy is not able to derive the right function signature https://github.com/python/mypy/issues/2427 + module_type.__getattr__ = functools.partial( # type: ignore[assignment] + getattr_with_deprecation, imports, full_module_name + ) + sys.modules.setdefault(full_module_name, module_type) diff --git a/dev/contrib/move_contrib.py b/dev/contrib/move_contrib.py new file mode 100644 index 0000000000000..5ead506a93739 --- /dev/null +++ b/dev/contrib/move_contrib.py @@ -0,0 +1,84 @@ +# 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. + +import ast +import os +from collections import defaultdict +from pathlib import Path +from typing import Dict, List, NamedTuple + +from jinja2 import BaseLoader, Environment +from rich.console import Console + +if __name__ not in ("__main__", "__mp_main__"): + raise SystemExit( + "This file is intended to be executed as an executable program. You cannot use it as a module." + f"To run this script, run the ./{__file__} command [FILE] ..." + ) + +AIRFLOW_SOURCES_ROOT = Path(__file__).parents[2].resolve() +CONTRIB_DIR = AIRFLOW_SOURCES_ROOT / "airflow" / "contrib" + + +class Import(NamedTuple): + module: str + name: str + alias: str + + +def get_imports(path: Path): + root = ast.parse(path.read_text()) + for node in ast.iter_child_nodes(root): + if isinstance(node, ast.Import): + module: List[str] = [] + elif isinstance(node, ast.ImportFrom) and node.module: + module = node.module.split('.') + else: + continue + for n in node.names: # type: ignore[attr-defined] + yield Import(".".join(module), n.name, n.asname if n.asname else n.name) + + +DEPRECATED_CLASSES_TEMPLATE = """ +__deprecated_classes = { +{%- for module, package_imports in package_imports.items() %} + '{{module}}': { +{%- for import_item in package_imports %} + '{{import_item.alias}}': '{{import_item.module}}.{{import_item.name}}', +{%- endfor %} + }, +{%- endfor %} +} +""" + + +if __name__ == '__main__': + console = Console(color_system="standard", width=300) + all_deprecated_imports: Dict[str, Dict[str, List[Import]]] = defaultdict(lambda: defaultdict(list)) + for contrib_file_path in CONTRIB_DIR.rglob("*.py"): + if contrib_file_path.name == '__init__.py': + continue + original_module = os.fspath(contrib_file_path.parent.relative_to(CONTRIB_DIR)).replace(os.sep, ".") + for _import in get_imports(contrib_file_path): + module_name = contrib_file_path.name[: -len(".py")] + if _import.name not in ['warnings']: + all_deprecated_imports[original_module][module_name].append(_import) + + for module, package_imports in all_deprecated_imports.items(): + console.print(f"[yellow]Import dictionary for {module}:\n") + template = Environment(loader=BaseLoader()).from_string(DEPRECATED_CLASSES_TEMPLATE) + console.print(template.render(package_imports=dict(sorted(package_imports.items())))) diff --git a/newsfragments/26153.significant.rst b/newsfragments/26153.significant.rst new file mode 100644 index 0000000000000..7eef1274f700b --- /dev/null +++ b/newsfragments/26153.significant.rst @@ -0,0 +1 @@ +The ``contrib`` packages have now dynamically generated modules and while users can continue using the deprecated contrib classes, they are no longer visible for static code check tools and will be reported as missing. It is recommended for the users to move to non-deprecated classes. diff --git a/tests/deprecated_classes.py b/tests/deprecated_classes.py index e882d27179ef6..63b6eb7f68f6b 100644 --- a/tests/deprecated_classes.py +++ b/tests/deprecated_classes.py @@ -19,146 +19,6 @@ "airflow.hooks.base.BaseHook", "airflow.hooks.base_hook.BaseHook", ), - ( - "airflow.providers.apache.cassandra.hooks.cassandra.CassandraHook", - "airflow.contrib.hooks.cassandra_hook.CassandraHook", - ), - ( - "airflow.providers.google.cloud.hooks.compute.ComputeEngineHook", - "airflow.contrib.hooks.gcp_compute_hook.GceHook", - ), - ( - "airflow.providers.google.common.hooks.base_google.GoogleBaseHook", - "airflow.contrib.hooks.gcp_api_base_hook.GoogleBaseHook", - ), - ( - "airflow.providers.google.cloud.hooks.dataflow.DataflowHook", - "airflow.contrib.hooks.gcp_dataflow_hook.DataFlowHook", - ), - ( - "airflow.providers.google.cloud.hooks.dataproc.DataprocHook", - "airflow.contrib.hooks.gcp_dataproc_hook.DataProcHook", - ), - ( - "airflow.providers.google.cloud.hooks.dlp.CloudDLPHook", - "airflow.contrib.hooks.gcp_dlp_hook.CloudDLPHook", - ), - ( - "airflow.providers.google.cloud.hooks.functions.CloudFunctionsHook", - "airflow.contrib.hooks.gcp_function_hook.GcfHook", - ), - ( - "airflow.providers.google.cloud.hooks.kms.CloudKMSHook", - "airflow.contrib.hooks.gcp_kms_hook.GoogleCloudKMSHook", - ), - ( - "airflow.providers.google.cloud.hooks.mlengine.MLEngineHook", - "airflow.contrib.hooks.gcp_mlengine_hook.MLEngineHook", - ), - ( - "airflow.providers.google.cloud.hooks.spanner.SpannerHook", - "airflow.contrib.hooks.gcp_spanner_hook.CloudSpannerHook", - ), - ( - "airflow.providers.google.cloud.hooks.speech_to_text.CloudSpeechToTextHook", - "airflow.contrib.hooks.gcp_speech_to_text_hook.GCPSpeechToTextHook", - ), - ( - "airflow.providers.google.cloud.hooks.text_to_speech.CloudTextToSpeechHook", - "airflow.contrib.hooks.gcp_text_to_speech_hook.GCPTextToSpeechHook", - ), - ( - "airflow.providers.google.cloud.hooks.gcs.GCSHook", - "airflow.contrib.hooks.gcs_hook.GoogleCloudStorageHook", - ), - ( - "airflow.providers.google.cloud.hooks.cloud_build.CloudBuildHook", - "airflow.contrib.hooks.gcp_cloud_build_hook.CloudBuildHook", - ), - ( - "airflow.providers.google.cloud.hooks.bigtable.BigtableHook", - "airflow.contrib.hooks.gcp_bigtable_hook.BigtableHook", - ), - ( - "airflow.providers.google.cloud.hooks.kubernetes_engine.GKEHook", - "airflow.contrib.hooks.gcp_container_hook.GKEClusterHook", - ), - ( - "airflow.providers.google.cloud.hooks.datastore.DatastoreHook", - "airflow.contrib.hooks.datastore_hook.DatastoreHook", - ), - ( - "airflow.providers.google.cloud.hooks.natural_language.CloudNaturalLanguageHook", - "airflow.contrib.hooks.gcp_natural_language_hook.CloudNaturalLanguageHook", - ), - ( - "airflow.providers.google.cloud.hooks.pubsub.PubSubHook", - "airflow.contrib.hooks.gcp_pubsub_hook.PubSubHook", - ), - ( - "airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLHook", - "airflow.contrib.hooks.gcp_sql_hook.CloudSqlHook", - ), - ( - "airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook", - "airflow.contrib.hooks.gcp_sql_hook.CloudSqlDatabaseHook", - ), - ( - "airflow.providers.google.cloud.hooks.tasks.CloudTasksHook", - "airflow.contrib.hooks.gcp_tasks_hook.CloudTasksHook", - ), - ( - "airflow.providers.google.cloud.hooks.cloud_storage_transfer_service.CloudDataTransferServiceHook", - "airflow.contrib.hooks.gcp_transfer_hook.GCPTransferServiceHook", - ), - ( - "airflow.providers.google.cloud.hooks.translate.CloudTranslateHook", - "airflow.contrib.hooks.gcp_translate_hook.CloudTranslateHook", - ), - ( - "airflow.providers.google.cloud.hooks.video_intelligence.CloudVideoIntelligenceHook", - "airflow.contrib.hooks.gcp_video_intelligence_hook.CloudVideoIntelligenceHook", - ), - ( - "airflow.providers.google.cloud.hooks.vision.CloudVisionHook", - "airflow.contrib.hooks.gcp_vision_hook.CloudVisionHook", - ), - ( - "airflow.providers.google.cloud.hooks.bigquery.BigQueryHook", - "airflow.contrib.hooks.bigquery_hook.BigQueryHook", - ), - ( - "airflow.providers.amazon.aws.hooks.s3.S3Hook", - "airflow.hooks.S3_hook.S3Hook", - ), - ( - "airflow.providers.amazon.aws.hooks.sqs.SqsHook", - "airflow.contrib.hooks.aws_sqs_hook.SQSHook", - ), - ( - 'airflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook', - 'airflow.contrib.hooks.pinot_hook.PinotDbApiHook', - ), - ( - 'airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook', - 'airflow.contrib.hooks.pinot_hook.PinotAdminHook', - ), - ( - 'airflow.providers.apache.spark.hooks.spark_jdbc.SparkJDBCHook', - 'airflow.contrib.hooks.spark_jdbc_hook.SparkJDBCHook', - ), - ( - 'airflow.providers.apache.spark.hooks.spark_sql.SparkSqlHook', - 'airflow.contrib.hooks.spark_sql_hook.SparkSqlHook', - ), - ( - 'airflow.providers.apache.spark.hooks.spark_submit.SparkSubmitHook', - 'airflow.contrib.hooks.spark_submit_hook.SparkSubmitHook', - ), - ( - 'airflow.providers.apache.sqoop.hooks.sqoop.SqoopHook', - 'airflow.contrib.hooks.sqoop_hook.SqoopHook', - ), ( 'airflow.providers.apache.druid.hooks.druid.DruidHook', 'airflow.hooks.druid_hook.DruidHook', @@ -195,861 +55,76 @@ 'airflow.providers.apache.hdfs.hooks.webhdfs.WebHDFSHook', 'airflow.hooks.webhdfs_hook.WebHDFSHook', ), - ( - 'airflow.hooks.filesystem.FSHook', - 'airflow.contrib.hooks.fs_hook.FSHook', - ), - ( - 'airflow.providers.microsoft.azure.hooks.container_instance.AzureContainerInstanceHook', - 'airflow.contrib.hooks.azure_container_instance_hook.AzureContainerInstanceHook', - ), - ( - 'airflow.providers.microsoft.azure.hooks.container_registry.AzureContainerRegistryHook', - 'airflow.contrib.hooks.azure_container_registry_hook.AzureContainerRegistryHook', - ), - ( - 'airflow.providers.microsoft.azure.hooks.container_volume.AzureContainerVolumeHook', - 'airflow.contrib.hooks.azure_container_volume_hook.AzureContainerVolumeHook', - ), - ( - 'airflow.providers.microsoft.azure.hooks.cosmos.AzureCosmosDBHook', - 'airflow.contrib.hooks.azure_cosmos_hook.AzureCosmosDBHook', - ), - ( - 'airflow.providers.microsoft.azure.hooks.fileshare.AzureFileShareHook', - 'airflow.contrib.hooks.azure_fileshare_hook.AzureFileShareHook', - ), - ( - 'airflow.providers.microsoft.azure.hooks.wasb.WasbHook', - 'airflow.contrib.hooks.wasb_hook.WasbHook', - ), - ( - 'airflow.providers.amazon.aws.hooks.logs.AwsLogsHook', - 'airflow.contrib.hooks.aws_logs_hook.AwsLogsHook', - ), - ( - 'airflow.providers.amazon.aws.hooks.emr.EmrHook', - 'airflow.contrib.hooks.emr_hook.EmrHook', - ), - ( - 'airflow.providers.amazon.aws.hooks.sagemaker.SageMakerHook', - 'airflow.contrib.hooks.sagemaker_hook.SageMakerHook', - ), - ( - 'airflow.providers.mongo.hooks.mongo.MongoHook', - 'airflow.contrib.hooks.mongo_hook.MongoHook', - ), - ( - 'airflow.providers.openfaas.hooks.openfaas.OpenFaasHook', - 'airflow.contrib.hooks.openfaas_hook.OpenFaasHook', - ), - ( - 'airflow.providers.redis.hooks.redis.RedisHook', - 'airflow.contrib.hooks.redis_hook.RedisHook', - ), ( 'airflow.providers.docker.hooks.docker.DockerHook', - 'airflow.hooks.docker_hook.DockerHook', - ), - ( - 'airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook', - 'airflow.hooks.mssql_hook.MsSqlHook', - ), - ( - 'airflow.providers.mysql.hooks.mysql.MySqlHook', - 'airflow.hooks.mysql_hook.MySqlHook', - ), - ( - 'airflow.providers.oracle.hooks.oracle.OracleHook', - 'airflow.hooks.oracle_hook.OracleHook', - ), - ( - 'airflow.providers.postgres.hooks.postgres.PostgresHook', - 'airflow.hooks.postgres_hook.PostgresHook', - ), - ( - 'airflow.providers.presto.hooks.presto.PrestoHook', - 'airflow.hooks.presto_hook.PrestoHook', - ), - ( - 'airflow.providers.samba.hooks.samba.SambaHook', - 'airflow.hooks.samba_hook.SambaHook', - ), - ( - 'airflow.providers.sqlite.hooks.sqlite.SqliteHook', - 'airflow.hooks.sqlite_hook.SqliteHook', - ), - ( - 'airflow.providers.cloudant.hooks.cloudant.CloudantHook', - 'airflow.contrib.hooks.cloudant_hook.CloudantHook', - ), - ( - 'airflow.providers.databricks.hooks.databricks.DatabricksHook', - 'airflow.contrib.hooks.databricks_hook.DatabricksHook', - ), - ( - 'airflow.providers.databricks.hooks.databricks.DatabricksHook', - 'airflow.contrib.hooks.databricks_hook.DatabricksHook', - ), - ( - 'airflow.providers.datadog.hooks.datadog.DatadogHook', - 'airflow.contrib.hooks.datadog_hook.DatadogHook', - ), - ( - 'airflow.providers.dingding.hooks.dingding.DingdingHook', - 'airflow.contrib.hooks.dingding_hook.DingdingHook', - ), - ( - 'airflow.providers.discord.hooks.discord_webhook.DiscordWebhookHook', - 'airflow.contrib.hooks.discord_webhook_hook.DiscordWebhookHook', - ), - ( - 'airflow.providers.google.suite.hooks.drive.GoogleDriveHook', - 'airflow.contrib.hooks.gdrive_hook.GoogleDriveHook', - ), - ( - 'airflow.providers.jenkins.hooks.jenkins.JenkinsHook', - 'airflow.contrib.hooks.jenkins_hook.JenkinsHook', - ), - ( - 'airflow.providers.atlassian.jira.hooks.jira.JiraHook', - 'airflow.contrib.hooks.jira_hook.JiraHook', - ), - ( - 'airflow.providers.opsgenie.hooks.opsgenie.OpsgenieAlertHook', - 'airflow.contrib.hooks.opsgenie_alert_hook.OpsgenieAlertHook', - ), - ( - 'airflow.providers.pagerduty.hooks.pagerduty.PagerdutyHook', - 'airflow.contrib.hooks.pagerduty_hook.PagerdutyHook', - ), - ( - 'airflow.providers.qubole.hooks.qubole_check.QuboleCheckHook', - 'airflow.contrib.hooks.qubole_check_hook.QuboleCheckHook', - ), - ( - 'airflow.providers.qubole.hooks.qubole.QuboleHook', - 'airflow.contrib.hooks.qubole_hook.QuboleHook', - ), - ( - 'airflow.providers.salesforce.hooks.salesforce.SalesforceHook', - 'airflow.contrib.hooks.salesforce_hook.SalesforceHook', - ), - ( - 'airflow.providers.segment.hooks.segment.SegmentHook', - 'airflow.contrib.hooks.segment_hook.SegmentHook', - ), - ( - 'airflow.providers.slack.hooks.slack_webhook.SlackWebhookHook', - 'airflow.contrib.hooks.slack_webhook_hook.SlackWebhookHook', - ), - ( - 'airflow.providers.vertica.hooks.vertica.VerticaHook', - 'airflow.contrib.hooks.vertica_hook.VerticaHook', - ), - ( - 'airflow.providers.slack.hooks.slack.SlackHook', - 'airflow.hooks.slack_hook.SlackHook', - ), - ( - 'airflow.providers.zendesk.hooks.zendesk.ZendeskHook', - 'airflow.hooks.zendesk_hook.ZendeskHook', - ), - ( - 'airflow.providers.ftp.hooks.ftp.FTPSHook', - 'airflow.contrib.hooks.ftp_hook.FTPSHook', - ), - ( - 'airflow.providers.ftp.hooks.ftp.FTPHook', - 'airflow.contrib.hooks.ftp_hook.FTPHook', - ), - ( - 'airflow.providers.imap.hooks.imap.ImapHook', - 'airflow.contrib.hooks.imap_hook.ImapHook', - ), - ( - 'airflow.providers.ssh.hooks.ssh.SSHHook', - 'airflow.contrib.hooks.ssh_hook.SSHHook', - ), - ( - 'airflow.providers.microsoft.winrm.hooks.winrm.WinRMHook', - 'airflow.contrib.hooks.winrm_hook.WinRMHook', - ), - ( - 'airflow.providers.http.hooks.http.HttpHook', - 'airflow.hooks.http_hook.HttpHook', - ), - ( - 'airflow.providers.jdbc.hooks.jdbc.JdbcHook', - 'airflow.hooks.jdbc_hook.JdbcHook', - ), - ( - 'airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook', - 'airflow.contrib.hooks.aws_hook.AwsHook', - ), - ( - 'airflow.providers.sftp.hooks.sftp.SFTPHook', - 'airflow.contrib.hooks.sftp_hook.SFTPHook', - ), - ( - "airflow.providers.atlassian.jira.hooks.jira.JiraHook", - "airflow.providers.jira.hooks.jira.JiraHook", - ), -] - -OPERATORS = [ - ( - "airflow.providers.google.cloud.operators.dataflow.DataflowCreateJavaJobOperator", - "airflow.contrib.operators.dataflow_operator.DataFlowJavaOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataflow.DataflowCreatePythonJobOperator", - "airflow.contrib.operators.dataflow_operator.DataFlowPythonOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataflow.DataflowTemplatedJobStartOperator", - "airflow.contrib.operators.dataflow_operator.DataflowTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.datastore.CloudDatastoreExportEntitiesOperator", - "airflow.contrib.operators.datastore_export_operator.DatastoreExportOperator", - ), - ( - "airflow.providers.google.cloud.operators.datastore.CloudDatastoreImportEntitiesOperator", - "airflow.contrib.operators.datastore_import_operator.DatastoreImportOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigtable.BigtableUpdateClusterOperator", - "airflow.contrib.operators.gcp_bigtable_operator.BigtableClusterUpdateOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigtable.BigtableCreateInstanceOperator", - "airflow.contrib.operators.gcp_bigtable_operator.BigtableInstanceCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigtable.BigtableDeleteInstanceOperator", - "airflow.contrib.operators.gcp_bigtable_operator.BigtableInstanceDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigtable.BigtableCreateTableOperator", - "airflow.contrib.operators.gcp_bigtable_operator.BigtableTableCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigtable.BigtableDeleteTableOperator", - "airflow.contrib.operators.gcp_bigtable_operator.BigtableTableDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_build.CloudBuildCreateBuildOperator", - "airflow.contrib.operators.gcp_cloud_build_operator.CloudBuildCreateBuildOperator", - ), - ( - "airflow.providers.google.cloud.operators.compute.ComputeEngineBaseOperator", - "airflow.contrib.operators.gcp_compute_operator.GceBaseOperator", - ), - ( - "airflow.providers.google.cloud.operators.compute" - ".ComputeEngineInstanceGroupUpdateManagerTemplateOperator", - "airflow.contrib.operators.gcp_compute_operator.GceInstanceGroupManagerUpdateTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.compute.ComputeEngineStartInstanceOperator", - "airflow.contrib.operators.gcp_compute_operator.GceInstanceStartOperator", - ), - ( - "airflow.providers.google.cloud.operators.compute.ComputeEngineStopInstanceOperator", - "airflow.contrib.operators.gcp_compute_operator.GceInstanceStopOperator", - ), - ( - "airflow.providers.google.cloud.operators.compute.ComputeEngineCopyInstanceTemplateOperator", - "airflow.contrib.operators.gcp_compute_operator.GceInstanceTemplateCopyOperator", - ), - ( - "airflow.providers.google.cloud.operators.compute.ComputeEngineSetMachineTypeOperator", - "airflow.contrib.operators.gcp_compute_operator.GceSetMachineTypeOperator", - ), - ( - "airflow.providers.google.cloud.operators.kubernetes_engine.GKECreateClusterOperator", - "airflow.contrib.operators.gcp_container_operator.GKEClusterCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.kubernetes_engine.GKEDeleteClusterOperator", - "airflow.contrib.operators.gcp_container_operator.GKEClusterDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.kubernetes_engine.GKEStartPodOperator", - "airflow.contrib.operators.gcp_container_operator.GKEPodOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPCancelDLPJobOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPCancelDLPJobOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPCreateDeidentifyTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPCreateDeidentifyTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPCreateDLPJobOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPCreateDLPJobOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPCreateInspectTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPCreateInspectTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPCreateJobTriggerOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPCreateJobTriggerOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPCreateStoredInfoTypeOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPCreateStoredInfoTypeOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPDeidentifyContentOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPDeidentifyContentOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDeidentifyTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPDeleteDeidentifyTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteDLPJobOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPDeleteDlpJobOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteInspectTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPDeleteInspectTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteJobTriggerOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPDeleteJobTriggerOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPDeleteStoredInfoTypeOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPDeleteStoredInfoTypeOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPGetDeidentifyTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPGetDeidentifyTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPGetDlpJobOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPGetInspectTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPGetInspectTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPGetDLPJobTriggerOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPGetJobTripperOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPGetStoredInfoTypeOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPGetStoredInfoTypeOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPInspectContentOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPInspectContentOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPListDeidentifyTemplatesOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPListDeidentifyTemplatesOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPListDLPJobsOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPListDlpJobsOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPListInfoTypesOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPListInfoTypesOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPListInspectTemplatesOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPListInspectTemplatesOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPListJobTriggersOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPListJobTriggersOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPListStoredInfoTypesOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPListStoredInfoTypesOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPRedactImageOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPRedactImageOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPReidentifyContentOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPReidentifyContentOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateDeidentifyTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPUpdateDeidentifyTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateInspectTemplateOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPUpdateInspectTemplateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateJobTriggerOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPUpdateJobTriggerOperator", - ), - ( - "airflow.providers.google.cloud.operators.dlp.CloudDLPUpdateStoredInfoTypeOperator", - "airflow.contrib.operators.gcp_dlp_operator.CloudDLPUpdateStoredInfoTypeOperator", - ), - ( - "airflow.providers.google.cloud.operators.functions.CloudFunctionDeleteFunctionOperator", - "airflow.contrib.operators.gcp_function_operator.GcfFunctionDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.functions.CloudFunctionDeployFunctionOperator", - "airflow.contrib.operators.gcp_function_operator.GcfFunctionDeployOperator", - ), - ( - "airflow.providers.google.cloud.operators.natural_language." - "CloudNaturalLanguageAnalyzeEntitiesOperator", - "airflow.contrib.operators.gcp_natural_language_operator.CloudLanguageAnalyzeEntitiesOperator", - ), - ( - "airflow.providers.google.cloud.operators.natural_language." - "CloudNaturalLanguageAnalyzeEntitySentimentOperator", - "airflow.contrib.operators.gcp_natural_language_operator." - "CloudLanguageAnalyzeEntitySentimentOperator", - ), - ( - "airflow.providers.google.cloud.operators.natural_language." - "CloudNaturalLanguageAnalyzeSentimentOperator", - "airflow.contrib.operators.gcp_natural_language_operator.CloudLanguageAnalyzeSentimentOperator", - ), - ( - "airflow.providers.google.cloud.operators.natural_language." - "CloudNaturalLanguageClassifyTextOperator", - "airflow.contrib.operators.gcp_natural_language_operator.CloudLanguageClassifyTextOperator", - ), - ( - "airflow.providers.google.cloud.operators.spanner.SpannerDeleteDatabaseInstanceOperator", - "airflow.contrib.operators.gcp_spanner_operator.CloudSpannerInstanceDatabaseDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.spanner.SpannerDeployDatabaseInstanceOperator", - "airflow.contrib.operators.gcp_spanner_operator.CloudSpannerInstanceDatabaseDeployOperator", - ), - ( - "airflow.providers.google.cloud.operators.spanner.SpannerQueryDatabaseInstanceOperator", - "airflow.contrib.operators.gcp_spanner_operator.CloudSpannerInstanceDatabaseQueryOperator", - ), - ( - "airflow.providers.google.cloud.operators.spanner.SpannerUpdateDatabaseInstanceOperator", - "airflow.contrib.operators.gcp_spanner_operator.CloudSpannerInstanceDatabaseUpdateOperator", - ), - ( - "airflow.providers.google.cloud.operators.spanner.SpannerDeleteInstanceOperator", - "airflow.contrib.operators.gcp_spanner_operator.CloudSpannerInstanceDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.spanner.SpannerDeployInstanceOperator", - "airflow.contrib.operators.gcp_spanner_operator.CloudSpannerInstanceDeployOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service" - ".CloudDataTransferServiceCreateJobOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service" - ".CloudDataTransferServiceDeleteJobOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service" - ".CloudDataTransferServiceUpdateJobOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceJobUpdateOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service." - "CloudDataTransferServiceCancelOperationOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationCancelOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service." - "CloudDataTransferServiceGetOperationOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationGetOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service." - "CloudDataTransferServicePauseOperationOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationPauseOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service." - "CloudDataTransferServiceResumeOperationOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationResumeOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service." - "CloudDataTransferServiceListOperationsOperator", - "airflow.contrib.operators.gcp_transfer_operator.GcpTransferServiceOperationsListOperator", - ), - ( - "airflow.providers.google.cloud.operators.translate.CloudTranslateTextOperator", - "airflow.contrib.operators.gcp_translate_operator.CloudTranslateTextOperator", - ), - ( - "airflow.providers.google.cloud.operators.translate_speech.CloudTranslateSpeechOperator", - "airflow.contrib.operators.gcp_translate_speech_operator.CloudTranslateSpeechOperator", - ), - ( - "airflow.providers.google.cloud.operators.video_intelligence." - "CloudVideoIntelligenceDetectVideoExplicitContentOperator", - "airflow.contrib.operators.gcp_video_intelligence_operator." - "CloudVideoIntelligenceDetectVideoExplicitContentOperator", - ), - ( - "airflow.providers.google.cloud.operators.video_intelligence." - "CloudVideoIntelligenceDetectVideoLabelsOperator", - "airflow.contrib.operators.gcp_video_intelligence_operator." - "CloudVideoIntelligenceDetectVideoLabelsOperator", - ), - ( - "airflow.providers.google.cloud.operators.video_intelligence." - "CloudVideoIntelligenceDetectVideoShotsOperator", - "airflow.contrib.operators.gcp_video_intelligence_operator." - "CloudVideoIntelligenceDetectVideoShotsOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionImageAnnotateOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionAnnotateImageOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionTextDetectOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectDocumentTextOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionDetectImageLabelsOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectImageLabelsOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionDetectImageSafeSearchOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectImageSafeSearchOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionDetectTextOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionDetectTextOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionGetProductOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductGetOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionCreateProductSetOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductSetCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionDeleteProductSetOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductSetDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionGetProductSetOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductSetGetOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductSetOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductSetUpdateOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionUpdateProductOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionProductUpdateOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionCreateReferenceImageOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionReferenceImageCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionRemoveProductFromProductSetOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionRemoveProductFromProductSetOperator", - ), - ( - "airflow.providers.google.cloud.operators.mlengine.MLEngineStartBatchPredictionJobOperator", - "airflow.contrib.operators.mlengine_operator.MLEngineBatchPredictionOperator", - ), - ( - "airflow.providers.google.cloud.operators.mlengine.MLEngineManageModelOperator", - "airflow.contrib.operators.mlengine_operator.MLEngineModelOperator", - ), - ( - "airflow.providers.google.cloud.operators.mlengine.MLEngineStartTrainingJobOperator", - "airflow.contrib.operators.mlengine_operator.MLEngineTrainingOperator", - ), - ( - "airflow.providers.google.cloud.operators.mlengine.MLEngineManageVersionOperator", - "airflow.contrib.operators.mlengine_operator.MLEngineVersionOperator", - ), - ( - "airflow.providers.google.cloud.operators.pubsub.PubSubPublishMessageOperator", - "airflow.contrib.operators.pubsub_operator.PubSubPublishOperator", - ), - ( - "airflow.providers.google.cloud.operators.pubsub.PubSubCreateSubscriptionOperator", - "airflow.contrib.operators.pubsub_operator.PubSubSubscriptionCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.pubsub.PubSubDeleteSubscriptionOperator", - "airflow.contrib.operators.pubsub_operator.PubSubSubscriptionDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.pubsub.PubSubCreateTopicOperator", - "airflow.contrib.operators.pubsub_operator.PubSubTopicCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.pubsub.PubSubDeleteTopicOperator", - "airflow.contrib.operators.pubsub_operator.PubSubTopicDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocCreateClusterOperator", - "airflow.contrib.operators.dataproc_operator.DataprocClusterCreateOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocDeleteClusterOperator", - "airflow.contrib.operators.dataproc_operator.DataprocClusterDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocScaleClusterOperator", - "airflow.contrib.operators.dataproc_operator.DataprocClusterScaleOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHadoopJobOperator", - "airflow.contrib.operators.dataproc_operator.DataProcHadoopOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHiveJobOperator", - "airflow.contrib.operators.dataproc_operator.DataProcHiveOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocJobBaseOperator", - "airflow.contrib.operators.dataproc_operator.DataProcJobBaseOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPigJobOperator", - "airflow.contrib.operators.dataproc_operator.DataProcPigOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocSubmitPySparkJobOperator", - "airflow.contrib.operators.dataproc_operator.DataProcPySparkOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkJobOperator", - "airflow.contrib.operators.dataproc_operator.DataProcSparkOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkSqlJobOperator", - "airflow.contrib.operators.dataproc_operator.DataProcSparkSqlOperator", - ), - ( - "airflow.providers.google.cloud." - "operators.dataproc.DataprocInstantiateInlineWorkflowTemplateOperator", - "airflow.contrib.operators.dataproc_operator.DataprocWorkflowTemplateInstantiateInlineOperator", - ), - ( - "airflow.providers.google.cloud.operators.dataproc.DataprocInstantiateWorkflowTemplateOperator", - "airflow.contrib.operators.dataproc_operator.DataprocWorkflowTemplateInstantiateOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryCreateEmptyDatasetOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryCreateEmptyDatasetOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryCreateEmptyTableOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryCreateEmptyTableOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryCreateExternalTableOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryCreateExternalTableOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryDeleteDatasetOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryDeleteDatasetOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryGetDatasetOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryGetDatasetOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryGetDatasetTablesOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryGetDatasetTablesOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryPatchDatasetOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryPatchDatasetOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryUpdateDatasetOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryUpdateDatasetOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryUpsertTableOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryUpsertTableOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryCheckOperator", - "airflow.contrib.operators.bigquery_check_operator.BigQueryCheckOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryIntervalCheckOperator", - "airflow.contrib.operators.bigquery_check_operator.BigQueryIntervalCheckOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryValueCheckOperator", - "airflow.contrib.operators.bigquery_check_operator.BigQueryValueCheckOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryGetDataOperator", - "airflow.contrib.operators.bigquery_get_data.BigQueryGetDataOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryExecuteQueryOperator", - "airflow.contrib.operators.bigquery_operator.BigQueryOperator", - ), - ( - "airflow.providers.google.cloud.operators.bigquery.BigQueryDeleteTableOperator", - "airflow.contrib.operators.bigquery_table_delete_operator.BigQueryTableDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.gcs.GCSBucketCreateAclEntryOperator", - "airflow.contrib.operators.gcs_acl_operator.GoogleCloudStorageBucketCreateAclEntryOperator", - ), - ( - "airflow.providers.google.cloud.operators.gcs.GCSObjectCreateAclEntryOperator", - "airflow.contrib.operators.gcs_acl_operator.GoogleCloudStorageObjectCreateAclEntryOperator", - ), - ( - "airflow.providers.google.cloud.operators.gcs.GCSDeleteObjectsOperator", - "airflow.contrib.operators.gcs_delete_operator.GoogleCloudStorageDeleteOperator", - ), - ( - "airflow.providers.google.cloud.operators.gcs.GCSListObjectsOperator", - "airflow.contrib.operators.gcs_list_operator.GoogleCloudStorageListOperator", - ), - ( - "airflow.providers.google.cloud.operators.gcs.GCSCreateBucketOperator", - "airflow.contrib.operators.gcs_operator.GoogleCloudStorageCreateBucketOperator", - ), - ( - "airflow.providers.amazon.aws.operators.batch.BatchOperator", - "airflow.contrib.operators.awsbatch_operator.AWSBatchOperator", - ), - ( - "airflow.providers.amazon.aws.operators.sqs.SqsPublishOperator", - "airflow.contrib.operators.aws_sqs_publish_operator.SQSPublishOperator", - ), - ( - "airflow.providers.amazon.aws.operators.sns.SnsPublishOperator", - "airflow.contrib.operators.sns_publish_operator.SnsPublishOperator", - ), - ( - 'airflow.providers.apache.druid.operators.druid.DruidOperator', - 'airflow.contrib.operators.druid_operator.DruidOperator', - ), - ( - 'airflow.providers.apache.spark.operators.spark_jdbc.SparkSubmitOperator', - 'airflow.contrib.operators.spark_jdbc_operator.SparkSubmitOperator', - ), - ( - 'airflow.providers.apache.spark.operators.spark_sql.SparkSqlOperator', - 'airflow.contrib.operators.spark_sql_operator.SparkSqlOperator', - ), - ( - 'airflow.providers.apache.spark.operators.spark_submit.SparkSubmitOperator', - 'airflow.contrib.operators.spark_submit_operator.SparkSubmitOperator', - ), - ( - 'airflow.providers.apache.spark.operators.spark_jdbc.SparkJDBCOperator', - 'airflow.contrib.operators.spark_jdbc_operator.SparkJDBCOperator', - ), - ( - 'airflow.providers.apache.sqoop.operators.sqoop.SqoopOperator', - 'airflow.contrib.operators.sqoop_operator.SqoopOperator', - ), - ( - 'airflow.providers.common.sql.operators.sql.SQLCheckOperator', - 'airflow.operators.druid_check_operator.DruidCheckOperator', - ), - ( - 'airflow.providers.apache.hive.operators.hive.HiveOperator', - 'airflow.operators.hive_operator.HiveOperator', + 'airflow.hooks.docker_hook.DockerHook', ), ( - 'airflow.providers.apache.hive.operators.hive_stats.HiveStatsCollectionOperator', - 'airflow.operators.hive_stats_operator.HiveStatsCollectionOperator', + 'airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook', + 'airflow.hooks.mssql_hook.MsSqlHook', ), ( - 'airflow.providers.apache.pig.operators.pig.PigOperator', - 'airflow.operators.pig_operator.PigOperator', + 'airflow.providers.mysql.hooks.mysql.MySqlHook', + 'airflow.hooks.mysql_hook.MySqlHook', ), ( - 'airflow.providers.microsoft.azure.operators.adls.ADLSListOperator', - 'airflow.contrib.operators.adls_list_operator.AzureDataLakeStorageListOperator', + 'airflow.providers.oracle.hooks.oracle.OracleHook', + 'airflow.hooks.oracle_hook.OracleHook', ), ( - 'airflow.providers.microsoft.azure.operators.container_instances.AzureContainerInstancesOperator', - 'airflow.contrib.operators.azure_container_instances_operator.AzureContainerInstancesOperator', + 'airflow.providers.postgres.hooks.postgres.PostgresHook', + 'airflow.hooks.postgres_hook.PostgresHook', ), ( - 'airflow.providers.microsoft.azure.operators.cosmos.AzureCosmosInsertDocumentOperator', - 'airflow.contrib.operators.azure_cosmos_operator.AzureCosmosInsertDocumentOperator', + 'airflow.providers.presto.hooks.presto.PrestoHook', + 'airflow.hooks.presto_hook.PrestoHook', ), ( - 'airflow.providers.microsoft.azure.operators.wasb_delete_blob.WasbDeleteBlobOperator', - 'airflow.contrib.operators.wasb_delete_blob_operator.WasbDeleteBlobOperator', + 'airflow.providers.samba.hooks.samba.SambaHook', + 'airflow.hooks.samba_hook.SambaHook', ), ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerBaseOperator', - 'airflow.contrib.operators.sagemaker_base_operator.SageMakerBaseOperator', + 'airflow.providers.sqlite.hooks.sqlite.SqliteHook', + 'airflow.hooks.sqlite_hook.SqliteHook', ), ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerEndpointConfigOperator', - 'airflow.contrib.operators.sagemaker_endpoint_config_operator.SageMakerEndpointConfigOperator', + 'airflow.providers.slack.hooks.slack.SlackHook', + 'airflow.hooks.slack_hook.SlackHook', ), ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerEndpointOperator', - 'airflow.contrib.operators.sagemaker_endpoint_operator.SageMakerEndpointOperator', + 'airflow.providers.zendesk.hooks.zendesk.ZendeskHook', + 'airflow.hooks.zendesk_hook.ZendeskHook', ), ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerModelOperator', - 'airflow.contrib.operators.sagemaker_model_operator.SageMakerModelOperator', + 'airflow.providers.http.hooks.http.HttpHook', + 'airflow.hooks.http_hook.HttpHook', ), ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerTrainingOperator', - 'airflow.contrib.operators.sagemaker_training_operator.SageMakerTrainingOperator', + 'airflow.providers.jdbc.hooks.jdbc.JdbcHook', + 'airflow.hooks.jdbc_hook.JdbcHook', ), ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerTransformOperator', - 'airflow.contrib.operators.sagemaker_transform_operator.SageMakerTransformOperator', + "airflow.providers.atlassian.jira.hooks.jira.JiraHook", + "airflow.providers.jira.hooks.jira.JiraHook", ), +] + +OPERATORS = [ ( - 'airflow.providers.amazon.aws.operators.sagemaker.SageMakerTuningOperator', - 'airflow.contrib.operators.sagemaker_tuning_operator.SageMakerTuningOperator', + 'airflow.providers.common.sql.operators.sql.SQLCheckOperator', + 'airflow.operators.druid_check_operator.DruidCheckOperator', ), ( - 'airflow.providers.docker.operators.docker_swarm.DockerSwarmOperator', - 'airflow.contrib.operators.docker_swarm_operator.DockerSwarmOperator', + 'airflow.providers.apache.hive.operators.hive.HiveOperator', + 'airflow.operators.hive_operator.HiveOperator', ), ( - 'airflow.providers.cncf.kubernetes.operators.kubernetes_pod.KubernetesPodOperator', - 'airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator', + 'airflow.providers.apache.hive.operators.hive_stats.HiveStatsCollectionOperator', + 'airflow.operators.hive_stats_operator.HiveStatsCollectionOperator', ), ( - 'airflow.providers.redis.operators.redis_publish.RedisPublishOperator', - 'airflow.contrib.operators.redis_publish_operator.RedisPublishOperator', + 'airflow.providers.apache.pig.operators.pig.PigOperator', + 'airflow.operators.pig_operator.PigOperator', ), ( 'airflow.operators.branch.BaseBranchOperator', @@ -1131,54 +206,6 @@ 'airflow.providers.sqlite.operators.sqlite.SqliteOperator', 'airflow.operators.sqlite_operator.SqliteOperator', ), - ( - 'airflow.providers.databricks.operators.databricks.DatabricksRunNowOperator', - 'airflow.contrib.operators.databricks_operator.DatabricksRunNowOperator', - ), - ( - 'airflow.providers.databricks.operators.databricks.DatabricksSubmitRunOperator', - 'airflow.contrib.operators.databricks_operator.DatabricksSubmitRunOperator', - ), - ( - 'airflow.providers.dingding.operators.dingding.DingdingOperator', - 'airflow.contrib.operators.dingding_operator.DingdingOperator', - ), - ( - 'airflow.providers.discord.operators.discord_webhook.DiscordWebhookOperator', - 'airflow.contrib.operators.discord_webhook_operator.DiscordWebhookOperator', - ), - ( - 'airflow.providers.jenkins.operators.jenkins_job_trigger.JenkinsJobTriggerOperator', - 'airflow.contrib.operators.jenkins_job_trigger_operator.JenkinsJobTriggerOperator', - ), - ( - 'airflow.providers.opsgenie.operators.opsgenie.OpsgenieCreateAlertOperator', - 'airflow.contrib.operators.opsgenie_alert_operator.OpsgenieAlertOperator', - ), - ( - 'airflow.providers.qubole.operators.qubole_check.QuboleCheckOperator', - 'airflow.contrib.operators.qubole_check_operator.QuboleCheckOperator', - ), - ( - 'airflow.providers.qubole.operators.qubole_check.QuboleValueCheckOperator', - 'airflow.contrib.operators.qubole_check_operator.QuboleValueCheckOperator', - ), - ( - 'airflow.providers.qubole.operators.qubole.QuboleOperator', - 'airflow.contrib.operators.qubole_operator.QuboleOperator', - ), - ( - 'airflow.providers.segment.operators.segment_track_event.SegmentTrackEventOperator', - 'airflow.contrib.operators.segment_track_event_operator.SegmentTrackEventOperator', - ), - ( - 'airflow.providers.slack.operators.slack_webhook.SlackWebhookOperator', - 'airflow.contrib.operators.slack_webhook_operator.SlackWebhookOperator', - ), - ( - 'airflow.providers.vertica.operators.vertica.VerticaOperator', - 'airflow.contrib.operators.vertica_operator.VerticaOperator', - ), ( 'airflow.providers.slack.operators.slack.SlackAPIPostOperator', 'airflow.operators.slack_operator.SlackAPIPostOperator', @@ -1187,18 +214,6 @@ 'airflow.providers.slack.operators.slack.SlackAPIOperator', 'airflow.operators.slack_operator.SlackAPIOperator', ), - ( - 'airflow.providers.grpc.operators.grpc.GrpcOperator', - 'airflow.contrib.operators.grpc_operator.GrpcOperator', - ), - ( - 'airflow.providers.ssh.operators.ssh.SSHOperator', - 'airflow.contrib.operators.ssh_operator.SSHOperator', - ), - ( - 'airflow.providers.microsoft.winrm.operators.winrm.WinRMOperator', - 'airflow.contrib.operators.winrm_operator.WinRMOperator', - ), ( 'airflow.operators.email.EmailOperator', 'airflow.operators.email_operator.EmailOperator', @@ -1211,66 +226,10 @@ 'airflow.providers.jdbc.operators.jdbc.JdbcOperator', 'airflow.operators.jdbc_operator.JdbcOperator', ), - ( - 'airflow.providers.sftp.operators.sftp.SFTPOperator', - 'airflow.contrib.operators.sftp_operator.SFTPOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLBaseOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlBaseOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLCreateInstanceDatabaseOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDatabaseCreateOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLCreateInstanceOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceCreateOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLDeleteInstanceDatabaseOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDatabaseDeleteOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLDeleteInstanceOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDeleteOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLExecuteQueryOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlQueryOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLExportInstanceOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceExportOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLImportInstanceOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceImportOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLInstancePatchOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstancePatchOperator', - ), - ( - 'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLPatchInstanceDatabaseOperator', - 'airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDatabasePatchOperator', - ), - ( - 'airflow.providers.atlassian.jira.operators.jira.JiraOperator', - 'airflow.contrib.operators.jira_operator.JiraOperator', - ), ( 'airflow.providers.postgres.operators.postgres.PostgresOperator', 'airflow.operators.postgres_operator.PostgresOperator', ), - ( - "airflow.providers.google.cloud.operators.speech_to_text.CloudSpeechToTextRecognizeSpeechOperator", - "airflow.contrib.operators.gcp_speech_to_text_operator.GcpSpeechToTextRecognizeSpeechOperator", - ), - ( - "airflow.providers.google.cloud.operators.text_to_speech.CloudTextToSpeechSynthesizeOperator", - "airflow.contrib.operators.gcp_text_to_speech_operator.GcpTextToSpeechSynthesizeOperator", - ), ( "airflow.operators.latest_only.LatestOnlyOperator", "airflow.operators.latest_only_operator.LatestOnlyOperator", @@ -1297,25 +256,6 @@ ), ] -SECRETS = [ - ( - "airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend", - "airflow.contrib.secrets.aws_secrets_manager.SecretsManagerBackend", - ), - ( - "airflow.providers.amazon.aws.secrets.systems_manager.SystemsManagerParameterStoreBackend", - "airflow.contrib.secrets.aws_systems_manager.SystemsManagerParameterStoreBackend", - ), - ( - "airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend", - "airflow.contrib.secrets.gcp_secrets_manager.CloudSecretsManagerBackend", - ), - ( - "airflow.providers.hashicorp.secrets.vault.VaultBackend", - "airflow.contrib.secrets.hashicorp_vault.VaultBackend", - ), -] - SENSORS = [ ( "airflow.sensors.base.BaseSensorOperator", @@ -1329,67 +269,6 @@ "airflow.sensors.time_delta.TimeDeltaSensor", "airflow.sensors.time_delta_sensor.TimeDeltaSensor", ), - ( - "airflow.providers.apache.cassandra.sensors.record.CassandraRecordSensor", - "airflow.contrib.sensors.cassandra_record_sensor.CassandraRecordSensor", - ), - ( - "airflow.providers.apache.cassandra.sensors.table.CassandraTableSensor", - "airflow.contrib.sensors.cassandra_table_sensor.CassandraTableSensor", - ), - ( - 'airflow.providers.datadog.sensors.datadog.DatadogSensor', - 'airflow.contrib.sensors.datadog_sensor.DatadogSensor', - ), - ( - "airflow.providers.google.cloud.sensors.bigtable.BigtableTableReplicationCompletedSensor", - "airflow.contrib.operators.gcp_bigtable_operator.BigtableTableWaitForReplicationSensor", - ), - ( - "airflow.providers.google.cloud.sensors.cloud_storage_transfer_service." - "CloudDataTransferServiceJobStatusSensor", - "airflow.contrib.sensors.gcp_transfer_sensor.GCPTransferServiceWaitForJobStatusSensor", - ), - ( - "airflow.providers.google.cloud.sensors.pubsub.PubSubPullSensor", - "airflow.contrib.sensors.pubsub_sensor.PubSubPullSensor", - ), - ( - "airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor", - "airflow.contrib.sensors.bigquery_sensor.BigQueryTableSensor", - ), - ( - "airflow.providers.google.cloud.sensors.gcs.GCSObjectExistenceSensor", - "airflow.contrib.sensors.gcs_sensor.GoogleCloudStorageObjectSensor", - ), - ( - "airflow.providers.google.cloud.sensors.gcs.GCSObjectUpdateSensor", - "airflow.contrib.sensors.gcs_sensor.GoogleCloudStorageObjectUpdatedSensor", - ), - ( - "airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor", - "airflow.contrib.sensors.gcs_sensor.GoogleCloudStoragePrefixSensor", - ), - ( - "airflow.providers.google.cloud.sensors.gcs.GCSUploadSessionCompleteSensor", - "airflow.contrib.sensors.gcs_sensor.GoogleCloudStorageUploadSessionCompleteSensor", - ), - ( - "airflow.providers.amazon.aws.sensors.athena.AthenaSensor", - "airflow.contrib.sensors.aws_athena_sensor.AthenaSensor", - ), - ( - "airflow.providers.amazon.aws.sensors.sqs.SqsSensor", - "airflow.contrib.sensors.aws_sqs_sensor.SQSSensor", - ), - ( - 'airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor', - 'airflow.contrib.sensors.hdfs_sensor.HdfsSensorFolder', - ), - ( - 'airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor', - 'airflow.contrib.sensors.hdfs_sensor.HdfsSensorRegex', - ), ( 'airflow.providers.apache.hive.sensors.hive_partition.HivePartitionSensor', 'airflow.sensors.hive_partition_sensor.HivePartitionSensor', @@ -1410,122 +289,14 @@ 'airflow.providers.apache.hdfs.sensors.hdfs.HdfsSensor', 'airflow.sensors.hdfs_sensor.HdfsSensor', ), - ( - 'airflow.sensors.weekday.DayOfWeekSensor', - 'airflow.contrib.sensors.weekday_sensor.DayOfWeekSensor', - ), - ( - 'airflow.sensors.filesystem.FileSensor', - 'airflow.contrib.sensors.file_sensor.FileSensor', - ), - ( - 'airflow.providers.microsoft.azure.sensors.wasb.WasbBlobSensor', - 'airflow.contrib.sensors.wasb_sensor.WasbBlobSensor', - ), - ( - 'airflow.providers.microsoft.azure.sensors.wasb.WasbPrefixSensor', - 'airflow.contrib.sensors.wasb_sensor.WasbPrefixSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.emr.EmrBaseSensor', - 'airflow.contrib.sensors.emr_base_sensor.EmrBaseSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.emr.EmrJobFlowSensor', - 'airflow.contrib.sensors.emr_job_flow_sensor.EmrJobFlowSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.emr.EmrStepSensor', - 'airflow.contrib.sensors.emr_step_sensor.EmrStepSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.sagemaker.SageMakerBaseSensor', - 'airflow.contrib.sensors.sagemaker_base_sensor.SageMakerBaseSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.sagemaker.SageMakerEndpointSensor', - 'airflow.contrib.sensors.sagemaker_endpoint_sensor.SageMakerEndpointSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.sagemaker.SageMakerTransformSensor', - 'airflow.contrib.sensors.sagemaker_transform_sensor.SageMakerTransformSensor', - ), - ( - 'airflow.providers.amazon.aws.sensors.sagemaker.SageMakerTuningSensor', - 'airflow.contrib.sensors.sagemaker_tuning_sensor.SageMakerTuningSensor', - ), ( 'airflow.providers.amazon.aws.sensors.s3.S3KeySensor', 'airflow.sensors.s3_key_sensor.S3KeySensor', ), - ( - 'airflow.sensors.bash.BashSensor', - 'airflow.contrib.sensors.bash_sensor.BashSensor', - ), - ( - 'airflow.providers.celery.sensors.celery_queue.CeleryQueueSensor', - 'airflow.contrib.sensors.celery_queue_sensor.CeleryQueueSensor', - ), - ( - 'airflow.providers.mongo.sensors.mongo.MongoSensor', - 'airflow.contrib.sensors.mongo_sensor.MongoSensor', - ), - ( - 'airflow.sensors.python.PythonSensor', - 'airflow.contrib.sensors.python_sensor.PythonSensor', - ), - ( - 'airflow.providers.redis.sensors.redis_key.RedisKeySensor', - 'airflow.contrib.sensors.redis_key_sensor.RedisKeySensor', - ), - ( - 'airflow.providers.redis.sensors.redis_pub_sub.RedisPubSubSensor', - 'airflow.contrib.sensors.redis_pub_sub_sensor.RedisPubSubSensor', - ), - ( - 'airflow.providers.datadog.sensors.datadog.DatadogSensor', - 'airflow.contrib.sensors.datadog_sensor.DatadogSensor', - ), - ( - 'airflow.providers.qubole.sensors.qubole.QuboleSensor', - 'airflow.contrib.sensors.qubole_sensor.QuboleSensor', - ), - ( - 'airflow.providers.qubole.sensors.qubole.QubolePartitionSensor', - 'airflow.contrib.sensors.qubole_sensor.QubolePartitionSensor', - ), - ( - 'airflow.providers.qubole.sensors.qubole.QuboleFileSensor', - 'airflow.contrib.sensors.qubole_sensor.QuboleFileSensor', - ), - ( - 'airflow.providers.ftp.sensors.ftp.FTPSensor', - 'airflow.contrib.sensors.ftp_sensor.FTPSensor', - ), - ( - 'airflow.providers.ftp.sensors.ftp.FTPSSensor', - 'airflow.contrib.sensors.ftp_sensor.FTPSSensor', - ), - ( - 'airflow.providers.imap.sensors.imap_attachment.ImapAttachmentSensor', - 'airflow.contrib.sensors.imap_attachment_sensor.ImapAttachmentSensor', - ), - ( - 'airflow.providers.atlassian.jira.sensors.jira.JiraSensor', - 'airflow.contrib.sensors.jira_sensor.JiraSensor', - ), - ( - 'airflow.providers.atlassian.jira.sensors.jira.JiraTicketSensor', - 'airflow.contrib.sensors.jira_sensor.JiraTicketSensor', - ), ( 'airflow.providers.http.sensors.http.HttpSensor', 'airflow.sensors.http_sensor.HttpSensor', ), - ( - 'airflow.providers.sftp.sensors.sftp.SFTPSensor', - 'airflow.contrib.sensors.sftp_sensor.SFTPSensor', - ), ( "airflow.providers.atlassian.jira.sensors.jira.JiraSensor", "airflow.providers.jira.sensors.jira.JiraSensor", @@ -1537,88 +308,6 @@ ] TRANSFERS = [ - ( - "airflow.providers.google.cloud.transfers.local_to_gcs.LocalFilesystemToGCSOperator", - "airflow.contrib.operators.file_to_gcs.FileToGoogleCloudStorageOperator", - ), - ( - "airflow.providers.google.cloud.transfers.adls_to_gcs.ADLSToGCSOperator", - "airflow.contrib.operators.adls_to_gcs.AdlsToGoogleCloudStorageOperator", - ), - ( - "airflow.providers.google.cloud.operators.cloud_storage_transfer_service." - "CloudDataTransferServiceGCSToGCSOperator", - "airflow.contrib.operators.gcp_transfer_operator." - "GoogleCloudStorageToGoogleCloudStorageTransferOperator", - ), - ( - "airflow.providers.google.cloud.operators.vision.CloudVisionAddProductToProductSetOperator", - "airflow.contrib.operators.gcp_vision_operator.CloudVisionAddProductToProductSetOperator", - ), - ( - "airflow.providers.google.cloud.transfers.gcs_to_bigquery.GCSToBigQueryOperator", - "airflow.contrib.operators.gcs_to_bq.GoogleCloudStorageToBigQueryOperator", - ), - ( - "airflow.providers.google.cloud.transfers.gcs_to_gcs.GCSToGCSOperator", - "airflow.contrib.operators.gcs_to_gcs.GoogleCloudStorageToGoogleCloudStorageOperator", - ), - ( - "airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Operator", - "airflow.contrib.operators.gcs_to_s3.GoogleCloudStorageToS3Operator", - ), - ( - "airflow.providers.google.cloud.transfers.mssql_to_gcs.MSSQLToGCSOperator", - "airflow.contrib.operators.mssql_to_gcs.MsSqlToGoogleCloudStorageOperator", - ), - ( - "airflow.providers.google.cloud.transfers.mysql_to_gcs.MySQLToGCSOperator", - "airflow.contrib.operators.mysql_to_gcs.MySqlToGoogleCloudStorageOperator", - ), - ( - "airflow.providers.google.cloud.transfers.postgres_to_gcs.PostgresToGCSOperator", - "airflow.contrib.operators.postgres_to_gcs_operator.PostgresToGoogleCloudStorageOperator", - ), - ( - "airflow.providers.google.cloud.transfers.bigquery_to_bigquery.BigQueryToBigQueryOperator", - "airflow.contrib.operators.bigquery_to_bigquery.BigQueryToBigQueryOperator", - ), - ( - "airflow.providers.google.cloud.transfers.bigquery_to_gcs.BigQueryToGCSOperator", - "airflow.contrib.operators.bigquery_to_gcs.BigQueryToCloudStorageOperator", - ), - ( - "airflow.providers.google.cloud.transfers.bigquery_to_mysql.BigQueryToMySqlOperator", - "airflow.contrib.operators.bigquery_to_mysql_operator.BigQueryToMySqlOperator", - ), - ( - "airflow.providers.google.cloud.transfers.sql_to_gcs.BaseSQLToGCSOperator", - "airflow.contrib.operators.sql_to_gcs.BaseSQLToGoogleCloudStorageOperator", - ), - ( - 'airflow.providers.amazon.aws.transfers.dynamodb_to_s3.DynamoDBToS3Operator', - 'airflow.contrib.operators.dynamodb_to_s3.DynamoDBToS3Operator', - ), - ( - 'airflow.providers.amazon.aws.transfers.hive_to_dynamodb.HiveToDynamoDBOperator', - 'airflow.contrib.operators.hive_to_dynamodb.HiveToDynamoDBOperator', - ), - ( - 'airflow.providers.amazon.aws.transfers.imap_attachment_to_s3.ImapAttachmentToS3Operator', - 'airflow.contrib.operators.imap_attachment_to_s3_operator.ImapAttachmentToS3Operator', - ), - ( - 'airflow.providers.amazon.aws.transfers.mongo_to_s3.MongoToS3Operator', - 'airflow.contrib.operators.mongo_to_s3.MongoToS3Operator', - ), - ( - 'airflow.providers.amazon.aws.transfers.s3_to_sftp.S3ToSFTPOperator', - 'airflow.contrib.operators.s3_to_sftp_operator.S3ToSFTPOperator', - ), - ( - 'airflow.providers.amazon.aws.transfers.sftp_to_s3.SFTPToS3Operator', - 'airflow.contrib.operators.sftp_to_s3_operator.SFTPToS3Operator', - ), ( 'airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Operator', 'airflow.operators.gcs_to_s3.GCSToS3Operator', @@ -1635,10 +324,6 @@ 'airflow.providers.amazon.aws.transfers.s3_to_redshift.S3ToRedshiftOperator', 'airflow.operators.s3_to_redshift_operator.S3ToRedshiftTransfer', ), - ( - 'airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaToHiveOperator', - 'airflow.contrib.operators.vertica_to_hive.VerticaToHiveTransfer', - ), ( 'airflow.providers.apache.druid.transfers.hive_to_druid.HiveToDruidOperator', 'airflow.operators.hive_to_druid.HiveToDruidTransfer', @@ -1663,55 +348,10 @@ 'airflow.providers.apache.hive.transfers.mssql_to_hive.MsSqlToHiveOperator', 'airflow.operators.mssql_to_hive.MsSqlToHiveTransfer', ), - ( - 'airflow.providers.microsoft.azure.transfers.local_to_wasb.LocalFilesystemToWasbOperator', - 'airflow.contrib.operators.file_to_wasb.FileToWasbOperator', - ), - ( - 'airflow.providers.google.suite.transfers.gcs_to_gdrive.GCSToGoogleDriveOperator', - 'airflow.contrib.operators.gcs_to_gdrive_operator.GCSToGoogleDriveOperator', - ), - ( - 'airflow.providers.microsoft.azure.transfers.oracle_to_azure_data_lake' - '.OracleToAzureDataLakeOperator', - 'airflow.contrib.operators.oracle_to_azure_data_lake_transfer.OracleToAzureDataLakeOperator', - ), - ( - 'airflow.providers.oracle.transfers.oracle_to_oracle.OracleToOracleOperator', - 'airflow.contrib.operators.oracle_to_oracle_transfer.OracleToOracleTransfer', - ), - ( - 'airflow.providers.google.cloud.transfers.s3_to_gcs.S3ToGCSOperator', - 'airflow.contrib.operators.s3_to_gcs_operator.S3ToGCSOperator', - ), - ( - 'airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator', - 'airflow.contrib.operators.vertica_to_mysql.VerticaToMySqlTransfer', - ), ( 'airflow.providers.mysql.transfers.presto_to_mysql.PrestoToMySqlOperator', 'airflow.operators.presto_to_mysql.PrestoToMySqlTransfer', ), - ( - 'airflow.providers.google.cloud.operators.cloud_storage_transfer_service' - '.CloudDataTransferServiceS3ToGCSOperator', - 'airflow.contrib.operators.s3_to_gcs_transfer_operator.CloudDataTransferServiceS3ToGCSOperator', - ), - ( - 'airflow.providers.google.cloud.transfers.cassandra_to_gcs.CassandraToGCSOperator', - 'airflow.contrib.operators.cassandra_to_gcs.CassandraToGoogleCloudStorageOperator', - ), -] - -UTILS = [ - ( - 'airflow.utils.log.task_handler_with_custom_formatter.TaskHandlerWithCustomFormatter', - 'airflow.contrib.utils.log.task_handler_with_custom_formatter.TaskHandlerWithCustomFormatter', - ), - ( - 'airflow.utils.weekday.WeekDay', - 'airflow.contrib.utils.weekday.WeekDay', - ), ] LOGS = [ @@ -1741,10 +381,10 @@ ), ] -ALL = HOOKS + OPERATORS + SECRETS + SENSORS + TRANSFERS + UTILS + LOGS +ALL = HOOKS + OPERATORS + SENSORS + TRANSFERS + LOGS RENAMED_ALL = [ (old_class, new_class) - for old_class, new_class in HOOKS + OPERATORS + SECRETS + SENSORS + UTILS + for old_class, new_class in HOOKS + OPERATORS + SENSORS if old_class.rpartition(".")[2] != new_class.rpartition(".")[2] ]