Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions airflow/providers/common/sql/hooks/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@ def connection(self) -> Connection:

@connection.setter
def connection(self, value: Any) -> None:
# This setter is for backward compatibility and should not be used.
# Since the introduction of connection property, the providers listed below
# breaks due to assigning value to self.connection
#
# apache-airflow-providers-mysql<5.7.1
# apache-airflow-providers-elasticsearch<5.5.1
# apache-airflow-providers-postgres<5.13.0
pass
if value != self.connection:
self.log.warning(
"This setter is for backward compatibility and should not be used.\n"
"Since the introduction of connection property, the providers listed below "
"breaks due to assigning value to self.connection in their __init__ method.\n"
"* apache-airflow-providers-mysql<5.7.1\n"
"* apache-airflow-providers-elasticsearch<5.5.1\n"
"* apache-airflow-providers-postgres<5.13.0"
)

@property
def connection_extra(self) -> dict:
Expand Down