shahar1 commented on code in PR #39716:
URL: https://github.com/apache/airflow/pull/39716#discussion_r1617609195
##########
tests/deprecations_ignore.yml:
##########
@@ -395,6 +395,9 @@
-
tests/providers/google/cloud/hooks/test_bigquery.py::TestTimePartitioningInRunJob::test_run_query_with_arg
-
tests/providers/google/cloud/hooks/test_bigquery.py::TestTimePartitioningInRunJob::test_run_with_auto_detect
-
tests/providers/google/cloud/hooks/test_cloud_sql.py::TestCloudSqlDatabaseHook::test_cloudsql_database_hook_get_database_hook
+-
tests/providers/google/cloud/hooks/test_datapipeline.py::TestDataPipelineHook::test_get_conn
+-
tests/providers/google/cloud/hooks/test_datapipeline.py::TestDataPipelineHook::test_create_data_pipeline
+-
tests/providers/google/cloud/hooks/test_datapipeline.py::TestDataPipelineHook::test_run_data_pipeline
Review Comment:
You could implement it as follows (see [1]):
```python
import warnings
def setup_method(self):
with warnings.catch_warnings():
warnings.simplefilter("ignore",
AirflowProviderDeprecationWarning)
self.datapipeline_hook =
DataPipelineHook(gcp_conn_id="google_cloud_default")
````
There are other cases in Airflow's codebase that use this method :)
[1]
https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]