Joffreybvn commented on code in PR #36205:
URL: https://github.com/apache/airflow/pull/36205#discussion_r1430613920
##########
airflow/providers/odbc/hooks/odbc.py:
##########
@@ -212,17 +216,27 @@ def get_sqlalchemy_connection(
cnx = engine.connect(**(connect_kwargs or {}))
return cnx
- @staticmethod
- def _make_serializable(result: list[pyodbc.Row] | pyodbc.Row | None) ->
list[NamedTuple] | None:
- """Transform the pyodbc.Row objects returned from an SQL command into
JSON-serializable NamedTuple."""
+ def _make_serializable(self, result: Any) -> Any:
Review Comment:
I think we need this back-compat fix anyway because the `make_serializable´
was introduced in odbc two patches ago (in
[4.2.0](https://airflow.apache.org/docs/apache-airflow-providers-odbc/4.3.0/changelog.html#id2)).
Thus, I added it with a warning. Airflow 2.8.1 constraint will need this
latest odbc provider version to not annoy users with the warning. So that only
people who stick with odbc==4.2.0 or odbc==4.3.0 while upgrading common.sql get
warned.
--
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]