Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2026-02-01 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3830941936

   @shahar1 I have checked , We haven't any deprecated query left in airflow 
   
   Could you please share your thoughts on this 


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2026-01-31 Thread via GitHub


shahar1 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3828937189

   > Cheers !! I truly appreciate [@choo121600](https://github.com/choo121600) 
, [@henry3260](https://github.com/henry3260) , 
[@Dev-iL](https://github.com/Dev-iL) , 
[@kunaljubce](https://github.com/kunaljubce) , 
[@uranusjr](https://github.com/uranusjr) , 
[@Srabasti](https://github.com/Srabasti) , 
[@rich7420](https://github.com/rich7420) , 
[@ricky-chaoju](https://github.com/ricky-chaoju) , 
[@0lai0](https://github.com/0lai0) , 
[@steveahnahn](https://github.com/steveahnahn) , 
[@justinpakzad](https://github.com/justinpakzad) , 
[@shahar1](https://github.com/shahar1) , [@potiuk](https://github.com/potiuk) , 
[@jscheffl](https://github.com/jscheffl) , 
[@vincbeck](https://github.com/vincbeck) , 
[@amoghrajesh](https://github.com/amoghrajesh) , 
[@kaxil](https://github.com/kaxil) , 
[@jason810496](https://github.com/jason810496), 
[@ephraimbuddy](https://github.com/ephraimbuddy) and all other contributors - 
If I missed anyone, please know your work is valued!
   > 
   > Suggestions or improvements are always welcome - I’d love to learn and 
improve
   
   Just making sure that I didn't (auto-)close this issue too early - there are 
linked PRs mentioned in the description that are still open.
   Are we ok with it?


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2026-01-31 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3828838961

   Cheers !! I truly appreciate @choo121600 , @henry3260 , @Dev-iL , 
@kunaljubce , @uranusjr , @Srabasti , @rich7420 , @ricky-chaoju , @0lai0 , 
@steveahnahn , @justinpakzad , @shahar1 , @potiuk , @jscheffl , @vincbeck , 
@amoghrajesh , @kaxil , @jason810496 and all other contributors - If I missed 
anyone, please know your work is valued!
   
   Suggestions or improvements are always welcome - I’d love to learn and 
improve


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2026-01-31 Thread via GitHub


shahar1 closed issue #59402: Remove deprecated Query usage and update to 
SQLAlchemy2.0 style
URL: https://github.com/apache/airflow/issues/59402


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2026-01-03 Thread via GitHub


Srabasti commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3707574744

   Fixed and merged in https://github.com/apache/airflow/pull/59865 
airflow-core/tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-30 Thread via GitHub


rickychen-infinirc commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3699079296

   I’m working on ```providers/standard``` tests.


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-30 Thread via GitHub


rickychen-infinirc commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3698895911

   Fixed and merged in https://github.com/apache/airflow/pull/59920
   airflow-core/tests/unit/dag_processing/test_collection.py


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-27 Thread via GitHub


rickychen-infinirc commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3693889996

   Fixed and merged in https://github.com/apache/airflow/pull/59849
   
   devel-common/
   devel-common/src/tests_common/pytest_plugin.py
   devel-common/src/tests_common/test_utils/logs.py
   devel-common/src/tests_common/test_utils/api_client_helpers.py
   devel-common/src/tests_common/test_utils/otel_utils.py
   devel-common/src/tests_common/test_utils/api_fastapi.py
   devel-common/src/tests_common/test_utils/db.py


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-26 Thread via GitHub


rickychen-infinirc commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3693803005

   Fixed and merged in #59837:
   
   test_dag.py
   test_dagcode.py
   test_mappedoperator.py
   test_taskinstance.py
   test_variable.py
   
   https://github.com/apache/airflow/pull/59837


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-26 Thread via GitHub


potiuk commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3693783862

   Yeah - it was closed by merging the issue with Fixed :)


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-26 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3693773947

   @potiuk Could you please reopen this issue? 
   Some tasks still remain to be completed, including work related to certain 
providers


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-26 Thread via GitHub


potiuk closed issue #59402: Remove deprecated Query usage and update to 
SQLAlchemy2.0 style
URL: https://github.com/apache/airflow/issues/59402


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-23 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3686029765

   GOGO~~🚀


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-23 Thread via GitHub


kunaljubce commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3686016363

   Working on #59748 for the below files:
   * airflow-core/tests/unit/utils/test_types.py
   * airflow-core/tests/unit/dag_processing/test_manager.py
   * airflow-core/tests/unit/dag_processing/test_processor.py
   * airflow-core/tests/unit/jobs/test_scheduler_job.py


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-16 Thread via GitHub


rich7420 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3663391278

   > [@Prab-27](https://github.com/Prab-27) [@0lai0](https://github.com/0lai0) 
, [@rich7420](https://github.com/rich7420) , 
[@henry3260](https://github.com/henry3260) 
[@steveahnahn](https://github.com/steveahnahn) For the reason explained 
[here](https://github.com/apache/airflow/pull/59422#issuecomment-3659544826), 
please group your PRs by related modules into a single PR like 
[#59501](https://github.com/apache/airflow/pull/59501) Otherwise, every time 
one PR gets merged, conflicts will need to be resolved in all the other PRs.
   
   sure, I'll tidy up and open a PR.


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-16 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3660086649

   > [@Prab-27](https://github.com/Prab-27) [@0lai0](https://github.com/0lai0) 
, [@rich7420](https://github.com/rich7420) , 
[@henry3260](https://github.com/henry3260) 
[@steveahnahn](https://github.com/steveahnahn) For the reason explained 
[here](https://github.com/apache/airflow/pull/59422#issuecomment-3659544826), 
please group your PRs by related modules into a single PR like 
[#59501](https://github.com/apache/airflow/pull/59501) Otherwise, every time 
one PR gets merged, conflicts will need to be resolved in all the other PRs.
   
   Great!! This also makes it easier to check for mypy errors. We only need to 
check once


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-16 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3660007339

   For the reason explained 
[here](https://github.com/apache/airflow/pull/59422#issuecomment-3659544826), 
please group your PRs by related modules into a single PR like #59501
   Otherwise, every time one PR gets merged, conflicts will need to be resolved 
in all the other PRs.


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-16 Thread via GitHub


rich7420 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3659373267

   No problem!


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3658958539

   Hello @choo121600 , @0lai0 , @rich7420 , @henry3260 @steveahnahn 
   
   If possible, could you please also verify the` mypy errors ` in step 5? I 
have updated the issue


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3657171351

   The issue has been updated. 


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654721925

   > > Hmm, first I’m checking how often this kind of case appears in the 
providers 😉
   > 
   > Only the providers listed in parentheses are affected. (amazon, google, 
datadog, elasticsearch, influxdb, opensearch, pinecone)
   
   Thanks!! I'm removing it from here and will rmeove query from them after 
updating the scipt 


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


rich7420 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654717832

   Maybe the provider has a lot of files that need to be split into multiple 
PRs.”


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654706714

   > Hmm, first I’m checking how often this kind of case appears in the 
providers 😉
   
   Only the providers listed in parentheses are affected.
   (amazon, google, datadog, elasticsearch, influxdb, opensearch, pinecone)


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


0lai0 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654636310

   Thanks @choo121600 . I am doing 
airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py .


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654599537

   GoGo~~🚀


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


0lai0 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654595227

   Hi, Could I help to contribute ?


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654593715

   > Now I’m thinking of removing that part from the issue where .query() is 
used as another method from other objects, and I’ll remove it after 
re‑implementing the script as it was previously
   
   Hmm, first I’m checking how often this kind of case appears in the providers 
😉


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


rich7420 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654439715

   Hello! could I take part in this issue?


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654370065

   Thanks for that. Let’s ask some others what they are saying 
   
   Could you please share your thoughts on this? @Dev-iL @potiuk 


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-15 Thread via GitHub


Prab-27 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654356544

   > [@Prab-27](https://github.com/Prab-27) I’ve been sending a few PRs, and 
out of curiosity I took a closer look at the internal logic 
[#54843](https://github.com/apache/airflow/pull/54843) I think there might be 
one small issue worth mentioning.
   > 
   > The current logic at lines 39–41 treats all .query() method calls as 
deprecated:
   > 
   > 
[airflow/scripts/ci/prek/prevent_deprecated_sqlalchemy_usage.py](https://github.com/apache/airflow/blob/8a109dbcb11f2edaa6255f543b0a8d37466cb439/scripts/ci/prek/prevent_deprecated_sqlalchemy_usage.py#L35-L53)
   > 
   > Lines 35 to 53 in 
[8a109db](/apache/airflow/commit/8a109dbcb11f2edaa6255f543b0a8d37466cb439)
   > 
   >  def check_session_query(mod: ast.Module, file_path: str) -> bool: 
   >  errors = False 
   >  for node in ast.walk(mod): 
   >  if isinstance(node, ast.Call) and isinstance(node.func, 
ast.Attribute): 
   >  if node.func.attr == "query": 
   >  console.print(f"Deprecated query-obj found at line 
{node.lineno} in {file_path}.") 
   >  errors = True 
   >  if isinstance(node, ast.ImportFrom): 
   >  if ( 
   >  node.module == "sqlalchemy.orm.query" 
   >  or node.module == "sqlalchemy" 
   >  or node.module == "sqlalchemy.orm" 
   >  ): 
   >  for alias in node.names: 
   >  if alias.name == "Query": 
   >  console.print(f"Deprecated Query class found at 
line {node.lineno} in {file_path}.") 
   >  errors = True 
   >   
   >  return errors 
   > This may potentially flag some legitimate API method calls used in 
provider code, such as those in Google or AWS providers.
   > 
   > In those cases, .query() is not SQLAlchemy’s deprecated session.query(), 
but a valid .query() method defined on a different object. WDYT?
   
   Your concern is correct. Earlier, the script detected only session.query(), 
but at some point the session was used as ss. or in a similar way, and then the 
script was modified to delete this query‑related PR. : #54843
   
   Now I’m thinking of removing that part from the issue where .query() is used 
as another method from other objects, and I’ll remove it after re‑implementing 
the script as it was previously


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-14 Thread via GitHub


henry3260 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3654006356

   > [@Prab-27](https://github.com/Prab-27) I’ve been sending a few PRs, and 
out of curiosity I took a closer look at the internal logic. I think there 
might be one small issue worth mentioning.
   > 
   > The current logic at lines 39–41 treats all .query() method calls as 
deprecated:
   > 
   > 
[airflow/scripts/ci/prek/prevent_deprecated_sqlalchemy_usage.py](https://github.com/apache/airflow/blob/8a109dbcb11f2edaa6255f543b0a8d37466cb439/scripts/ci/prek/prevent_deprecated_sqlalchemy_usage.py#L35-L53)
   > 
   > Lines 35 to 53 in 
[8a109db](/apache/airflow/commit/8a109dbcb11f2edaa6255f543b0a8d37466cb439)
   > 
   >  def check_session_query(mod: ast.Module, file_path: str) -> bool: 
   >  errors = False 
   >  for node in ast.walk(mod): 
   >  if isinstance(node, ast.Call) and isinstance(node.func, 
ast.Attribute): 
   >  if node.func.attr == "query": 
   >  console.print(f"Deprecated query-obj found at line 
{node.lineno} in {file_path}.") 
   >  errors = True 
   >  if isinstance(node, ast.ImportFrom): 
   >  if ( 
   >  node.module == "sqlalchemy.orm.query" 
   >  or node.module == "sqlalchemy" 
   >  or node.module == "sqlalchemy.orm" 
   >  ): 
   >  for alias in node.names: 
   >  if alias.name == "Query": 
   >  console.print(f"Deprecated Query class found at 
line {node.lineno} in {file_path}.") 
   >  errors = True 
   >   
   >  return errors 
   > This may potentially flag some legitimate API method calls used in 
provider code, such as those in Google or AWS providers.
   > 
   > In those cases, .query() is not SQLAlchemy’s deprecated session.query(), 
but a valid .query() method defined on a different object. WDYT?
   
   Great catch! I suggest we refine the AST check to inspect the caller of the 
.query() method.
   
   In Airflow, SQLAlchemy usage is predominantly session.query(...). We can 
modify the script to verify if the object calling .query is explicitly named 
session


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-14 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3653928470

   @Prab-27  I’ve been sending a few PRs, and out of curiosity I took a closer 
look at the internal logic.
   I think there might be one small issue worth mentioning.
   
   The current logic at lines 39–41 treats all .query() method calls as 
deprecated:
   
   
https://github.com/apache/airflow/blob/8a109dbcb11f2edaa6255f543b0a8d37466cb439/scripts/ci/prek/prevent_deprecated_sqlalchemy_usage.py#L35-L53
   
   This may potentially flag some legitimate API method calls used in provider 
code, such as those in Google or AWS providers.
   
   In those cases, .query() is not SQLAlchemy’s deprecated session.query(), but 
a valid .query() method defined on a different object.


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-14 Thread via GitHub


choo121600 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3653023452

   I think this is good first issue :)


-- 
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]



Re: [I] Remove deprecated Query usage and update to SQLAlchemy2.0 style [airflow]

2025-12-14 Thread via GitHub


henry3260 commented on issue #59402:
URL: https://github.com/apache/airflow/issues/59402#issuecomment-3650448987

   Thanks for opening this!!!


-- 
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]