This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 67befb71bf Resolve CloudSQLDatabaseHook deprecation warning (#40834)
67befb71bf is described below
commit 67befb71bfcebf6288f960a6b6986d7db6cfe3c0
Author: Gopal Dirisala <[email protected]>
AuthorDate: Thu Jul 18 13:59:57 2024 +0530
Resolve CloudSQLDatabaseHook deprecation warning (#40834)
---
airflow/providers/google/cloud/hooks/cloud_sql.py | 2 +-
tests/deprecations_ignore.yml | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/airflow/providers/google/cloud/hooks/cloud_sql.py
b/airflow/providers/google/cloud/hooks/cloud_sql.py
index a6b5b61a91..bb7b2e6c87 100644
--- a/airflow/providers/google/cloud/hooks/cloud_sql.py
+++ b/airflow/providers/google/cloud/hooks/cloud_sql.py
@@ -1148,7 +1148,7 @@ class CloudSQLDatabaseHook(BaseHook):
connects directly to the Google Cloud SQL database.
"""
if self.database_type == "postgres":
- db_hook: PostgresHook | MySqlHook =
PostgresHook(connection=connection, schema=self.database)
+ db_hook: PostgresHook | MySqlHook =
PostgresHook(connection=connection, database=self.database)
else:
db_hook = MySqlHook(connection=connection, schema=self.database)
self.db_hook = db_hook
diff --git a/tests/deprecations_ignore.yml b/tests/deprecations_ignore.yml
index a5d8abb538..07984fcb21 100644
--- a/tests/deprecations_ignore.yml
+++ b/tests/deprecations_ignore.yml
@@ -105,7 +105,6 @@
-
tests/providers/google/cloud/hooks/test_bigquery.py::TestTimePartitioningInRunJob::test_run_load_with_arg
-
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_gcs.py::TestGCSHook::test_list__error_match_glob_and_invalid_delimiter
-
tests/providers/google/cloud/hooks/test_life_sciences.py::TestLifeSciencesHookWithDefaultProjectIdFromConnection::test_error_operation
-
tests/providers/google/cloud/hooks/test_life_sciences.py::TestLifeSciencesHookWithDefaultProjectIdFromConnection::test_life_science_client_creation