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

jason810496 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 b2273b55fa3 Make Pool model session parameter keyword-only (#66967)
b2273b55fa3 is described below

commit b2273b55fa3f60b345718938c162bbc003ae35b8
Author: Colten <[email protected]>
AuthorDate: Mon May 18 21:02:20 2026 +0800

    Make Pool model session parameter keyword-only (#66967)
---
 airflow-core/src/airflow/models/pool.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/airflow-core/src/airflow/models/pool.py 
b/airflow-core/src/airflow/models/pool.py
index 054cbcb6685..65f17c15b19 100644
--- a/airflow-core/src/airflow/models/pool.py
+++ b/airflow-core/src/airflow/models/pool.py
@@ -128,6 +128,7 @@ class Pool(Base):
         slots: int,
         description: str,
         include_deferred: bool,
+        *,
         session: Session = NEW_SESSION,
     ) -> Pool:
         """Create a pool with given parameters or update it if it already 
exists."""
@@ -143,12 +144,11 @@ class Pool(Base):
             pool.description = description
             pool.include_deferred = include_deferred
 
-        session.commit()
         return pool
 
     @staticmethod
     @provide_session
-    def delete_pool(name: str, session: Session = NEW_SESSION) -> Pool:
+    def delete_pool(name: str, *, session: Session = NEW_SESSION) -> Pool:
         """Delete pool by a given name."""
         if name == Pool.DEFAULT_POOL_NAME:
             raise AirflowException(f"{Pool.DEFAULT_POOL_NAME} cannot be 
deleted")
@@ -158,7 +158,6 @@ class Pool(Base):
             raise PoolNotFound(f"Pool '{name}' doesn't exist")
 
         session.delete(pool)
-        session.commit()
 
         return pool
 

Reply via email to