This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new c33915794e4 Remove deprecated Query usage and update to SQLAlchemy2.0 
style for test_not_previously_skipped_dep.py (#59865)
c33915794e4 is described below

commit c33915794e47f5b21b62e162e98a82ba56b00c53
Author: Srabasti Banerjee <[email protected]>
AuthorDate: Sat Jan 3 16:09:47 2026 -0800

    Remove deprecated Query usage and update to SQLAlchemy2.0 style for 
test_not_previously_skipped_dep.py (#59865)
    
    * Fix deprecated sqlalchemy usage for test_processor.py
    
    * Remove deprecate Query usage and upgrade to SQLAlchemy2.0
    
    * Updating files for test_not_previously_skipped_dep.py
    
    * Reverting changes to pyproject.toml files for 
test_not_previously_skipped_dep.py
    
    * Reverting changes to pyproject.toml files for 
test_not_previously_skipped_dep.py
    
    * Reverting changes to pyproject.toml files for 
test_not_previously_skipped_dep.py
    
    * Making changes to test_not_previously_skipped_dep.py
    
    * Making changes to pre-committest_not_previously_skipped_dep.py
    
    * Making changes to pre-commit-config
    
    * Fix pre-commit hook issues hopefully
---
 .pre-commit-config.yaml                                              | 1 +
 .../tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py       | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3c44260d070..fe37e36b9c0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -463,6 +463,7 @@ repos:
             ^airflow-core/tests/unit/utils/test_db_cleanup.py$|
             ^airflow-core/tests/unit/utils/test_state.py$|
             ^airflow-core/tests/unit/utils/test_log_handlers.py$|
+            
^airflow-core/tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py$|
             ^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$|
diff --git 
a/airflow-core/tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py 
b/airflow-core/tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py
index 2957e39e6fe..0227ca2325e 100644
--- a/airflow-core/tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py
+++ b/airflow-core/tests/unit/ti_deps/deps/test_not_previously_skipped_dep.py
@@ -19,6 +19,7 @@ from __future__ import annotations
 
 import pendulum
 import pytest
+from sqlalchemy import delete
 
 from airflow.models import DagRun, TaskInstance
 from airflow.providers.standard.operators.empty import EmptyOperator
@@ -36,8 +37,8 @@ pytestmark = pytest.mark.db_test
 @pytest.fixture(autouse=True)
 def clean_db(session):
     yield
-    session.query(DagRun).delete()
-    session.query(TaskInstance).delete()
+    session.execute(delete(DagRun))
+    session.execute(delete(TaskInstance))
 
 
 def test_no_parent(session, dag_maker):

Reply via email to