Skip to content

Commit e013236

Browse files
Add deprecation info to the providers modules and classes docstring (#32536)
* Add deprecation info to providers modules and classes docstring Signed-off-by: Hussein Awala <hussein@awala.fr> --------- Signed-off-by: Hussein Awala <hussein@awala.fr>
1 parent 145b16c commit e013236

File tree

21 files changed

+75
-7
lines changed

21 files changed

+75
-7
lines changed

β€Žairflow/providers/apache/drill/operators/drill.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class DrillOperator(SQLExecuteQueryOperator):
2828
"""
2929
Executes the provided SQL in the identified Drill environment.
3030
31+
This class is deprecated.
32+
33+
Please use :class:`airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator`.
34+
3135
.. seealso::
3236
For more information on how to use this operator, take a look at the guide:
3337
:ref:`howto/operator:DrillOperator`

β€Žairflow/providers/apache/druid/operators/druid_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DruidCheckOperator(SQLCheckOperator):
2727
"""
2828
This class is deprecated.
2929
30-
Please use `airflow.providers.common.sql.operators.sql.SQLCheckOperator`.
30+
Please use :class:`airflow.providers.common.sql.operators.sql.SQLCheckOperator`.
3131
"""
3232

3333
def __init__(self, druid_broker_conn_id: str = "druid_broker_default", **kwargs):

β€Žairflow/providers/cncf/kubernetes/operators/kubernetes_pod.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18+
"""This module is deprecated. Please use :mod:`airflow.providers.cncf.kubernetes.operators.pod` instead."""
1819
from __future__ import annotations
1920

2021
import warnings

β€Žairflow/providers/cncf/kubernetes/triggers/kubernetes_pod.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18+
"""This module is deprecated. Please use :mod:`airflow.providers.cncf.kubernetes.triggers.pod` instead."""
1819
from __future__ import annotations
1920

2021
import warnings

β€Žairflow/providers/elasticsearch/hooks/elasticsearch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class ElasticsearchHook(ElasticsearchSQLHook):
142142
"""
143143
This class is deprecated and was renamed to ElasticsearchSQLHook.
144144
145-
Please use `airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook`.
145+
Please use :class:`airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook`.
146146
"""
147147

148148
def __init__(self, *args, **kwargs):

β€Žairflow/providers/google/cloud/operators/dataflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ class DataflowCreateJavaJobOperator(GoogleCloudBaseOperator):
173173
Start a Java Cloud Dataflow batch job; the parameters of the operation will be passed to the job.
174174
175175
This class is deprecated.
176+
176177
Please use :class:`providers.apache.beam.operators.beam.BeamRunJavaPipelineOperator`.
177178
178179
Example usage:
@@ -1023,6 +1024,7 @@ class DataflowCreatePythonJobOperator(GoogleCloudBaseOperator):
10231024
for instances, project and zone information, which apply to all dataflow operators in the DAG.
10241025
10251026
This class is deprecated.
1027+
10261028
Please use :class:`providers.apache.beam.operators.beam.BeamRunPythonPipelineOperator`.
10271029
10281030
.. seealso::

β€Žairflow/providers/google/cloud/sensors/bigquery.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ class BigQueryTableExistenceAsyncSensor(BigQueryTableExistenceSensor):
256256
"""
257257
Checks for the existence of a table in Google Big Query.
258258
259+
This class is deprecated and will be removed in a future release.
260+
261+
Please use :class:`airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor`
262+
and set *deferrable* attribute to *True* instead.
263+
259264
:param project_id: The Google cloud project in which to look for the table.
260265
The connection supplied to the hook must provide
261266
access to the specified project.
@@ -291,6 +296,11 @@ class BigQueryTableExistencePartitionAsyncSensor(BigQueryTablePartitionExistence
291296
"""
292297
Checks for the existence of a partition within a table in Google BigQuery.
293298
299+
This class is deprecated and will be removed in a future release.
300+
301+
Please use :class:`airflow.providers.google.cloud.sensors.bigquery.BigQueryTablePartitionExistenceSensor`
302+
and set *deferrable* attribute to *True* instead.
303+
294304
:param project_id: The Google cloud project in which to look for the table.
295305
The connection supplied to the hook must provide
296306
access to the specified project.
@@ -316,7 +326,7 @@ def __init__(self, **kwargs):
316326
warnings.warn(
317327
"Class `BigQueryTableExistencePartitionAsyncSensor` is deprecated and "
318328
"will be removed in a future release. "
319-
"Please use `BigQueryTableExistencePartitionSensor` and "
329+
"Please use `BigQueryTablePartitionExistenceSensor` and "
320330
"set `deferrable` attribute to `True` instead",
321331
AirflowProviderDeprecationWarning,
322332
)

β€Žairflow/providers/google/cloud/sensors/gcs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ class GCSObjectExistenceAsyncSensor(GCSObjectExistenceSensor):
133133
"""
134134
Checks for the existence of a file in Google Cloud Storage.
135135
136-
Class `GCSObjectExistenceAsyncSensor` is deprecated and will be removed in a future release.
137-
Please use `GCSObjectExistenceSensor` and set `deferrable` attribute to `True` instead.
136+
This class is deprecated and will be removed in a future release.
137+
138+
Please use :class:`airflow.providers.google.cloud.sensors.gcs.GCSObjectExistenceSensor`
139+
and set *deferrable* attribute to *True* instead.
138140
139141
:param bucket: The Google Cloud Storage bucket where the object is.
140142
:param object: The name of the object to check in the Google cloud storage bucket.

β€Žairflow/providers/jdbc/operators/jdbc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class JdbcOperator(SQLExecuteQueryOperator):
3030
3131
Requires jaydebeapi.
3232
33+
This class is deprecated.
34+
35+
Please use :class:`airflow.providers.common.sql.operators.sql.SQLExecuteQueryOperator` instead.
36+
3337
.. seealso::
3438
For more information on how to use this operator, take a look at the guide:
3539
:ref:`howto/operator:JdbcOperator`

β€Žairflow/providers/microsoft/azure/sensors/data_factory.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ class AzureDataFactoryPipelineRunStatusAsyncSensor(AzureDataFactoryPipelineRunSt
127127
"""
128128
Checks the status of a pipeline run asynchronously.
129129
130+
This class is deprecated and will be removed in a future release.
131+
132+
Please use
133+
:class:`airflow.providers.microsoft.azure.sensors.data_factory.AzureDataFactoryPipelineRunStatusSensor`
134+
and set *deferrable* attribute to *True* instead.
135+
130136
:param azure_data_factory_conn_id: The connection identifier for connecting to Azure Data Factory.
131137
:param run_id: The pipeline run identifier.
132138
:param resource_group_name: The resource group name.

0 commit comments

Comments
 (0)