potiuk commented on PR #38281:
URL: https://github.com/apache/airflow/pull/38281#issuecomment-2008674800

   Explanation of the `mypy` problem:
   
   The MyPy Issue is because for DBApiHook we have a .pyi interface as well 
defined (to flag any case where we change the interface. See 
`common.sql.hooks.sql.pyi`. And this is actually expected behaviour here for 
mypy to fail, because it drags our attention to this change in the DBApiHook 
"public API". So it's great it failed here, otherwise we would not have noticed 
a dependency issue :). So the failure of MyPy here is an intended harness, not 
a bug.
   
   We should in this case:
   
   * add the data_transfer method to the sql.pyi (i.e. change interface of 
DBApiHook)
   
   * increase MINOR version of the `common.sql` -> this is a new feature the 
snowflake and oracle hooks depend on.  Currenty  it is  `1.11.1` so we should 
bump it to `1.12.0`. 
   
   * add common.sql >= `_new_common_sql_version` in dependencies of the 
modified providers - they have currently:  
      * Snowflake: `apache-airflow-providers-common-sql>=1.10.0`
      * Oracle: `apache-airflow-providers-common-sql>=1.3.1`
   Both should get `>= 1.12.0` there.
   
   * We should also likely add in the docstring of DBAPIHook something along 
the lines "If you are extending this method, make sure to use 
`apache-airflow-providers-common-sql>=1.12.0` dependency in your provider.
   
   
   


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to