Skip to content

Commit 67befb7

Browse files
authored
Resolve CloudSQLDatabaseHook deprecation warning (#40834)
1 parent fec2b10 commit 67befb7

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

airflow/providers/google/cloud/hooks/cloud_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ def get_database_hook(self, connection: Connection) -> PostgresHook | MySqlHook:
11481148
connects directly to the Google Cloud SQL database.
11491149
"""
11501150
if self.database_type == "postgres":
1151-
db_hook: PostgresHook | MySqlHook = PostgresHook(connection=connection, schema=self.database)
1151+
db_hook: PostgresHook | MySqlHook = PostgresHook(connection=connection, database=self.database)
11521152
else:
11531153
db_hook = MySqlHook(connection=connection, schema=self.database)
11541154
self.db_hook = db_hook

tests/deprecations_ignore.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
- tests/providers/google/cloud/hooks/test_bigquery.py::TestTimePartitioningInRunJob::test_run_load_with_arg
106106
- tests/providers/google/cloud/hooks/test_bigquery.py::TestTimePartitioningInRunJob::test_run_query_with_arg
107107
- tests/providers/google/cloud/hooks/test_bigquery.py::TestTimePartitioningInRunJob::test_run_with_auto_detect
108-
- tests/providers/google/cloud/hooks/test_cloud_sql.py::TestCloudSqlDatabaseHook::test_cloudsql_database_hook_get_database_hook
109108
- tests/providers/google/cloud/hooks/test_gcs.py::TestGCSHook::test_list__error_match_glob_and_invalid_delimiter
110109
- tests/providers/google/cloud/hooks/test_life_sciences.py::TestLifeSciencesHookWithDefaultProjectIdFromConnection::test_error_operation
111110
- tests/providers/google/cloud/hooks/test_life_sciences.py::TestLifeSciencesHookWithDefaultProjectIdFromConnection::test_life_science_client_creation

0 commit comments

Comments
 (0)