]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix parameter mutation in orm_pre_session_exec()
authorShamil <ashm.tech@proton.me>
Thu, 20 Nov 2025 12:44:34 +0000 (07:44 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 20 Nov 2025 19:18:35 +0000 (14:18 -0500)
commit6ee4d884f04aa6bad21ad280a02441262863394c
treecf46d962de026b6c90cf07163b1743d560689bc2
parent708a0360b17b6cae0135f1d6143b0ee1e88e885c
Fix parameter mutation in orm_pre_session_exec()

The :meth:`_events.SessionEvents.do_orm_execute` event now allows direct
mutation or replacement of the :attr:`.ORMExecuteState.parameters`
dictionary or list, which will take effect when the the statement is
executed.  Previously, changes to this collection were not accommodated by
the event hook.  Pull request courtesy Shamil.

Fixes: #12921
Closes: #12989
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12989
Pull-request-sha: 86b64e06178f8722f1c1700fd9fcca53ca572e78

Change-Id: I04874b6ca720eb2be1470067ced4afd79896e267
doc/build/changelog/unreleased_21/12921.rst [new file with mode: 0644]
lib/sqlalchemy/orm/bulk_persistence.py
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/session.py
test/orm/test_events.py