shahar1 commented on code in PR #40751:
URL: https://github.com/apache/airflow/pull/40751#discussion_r1703190727
##########
airflow/providers/common/sql/hooks/sql.py:
##########
@@ -202,9 +204,28 @@ def placeholder(self):
)
return self._placeholder
+ @property
+ def connection(self) -> Connection:
+ if self._connection is None:
+ self._connection = self.get_connection(self.get_conn_id())
+ return deepcopy(self._connection)
Review Comment:
https://github.com/apache/airflow/blame/main/airflow/providers/odbc/hooks/odbc.py
I don't see usage of `deepcopy` in `OdbcHook`
I'd rather keep it for now without `deepcopy` for the reasons that Jarek
stated (memory leaks etc.), and only if we understand its necessity - put it
back.
--
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]