diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-08-26 22:00:33 +0200 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2021-08-26 22:00:58 +0200 |
commit | f02349336fa4470dbb5ca8e4d16031b8aa86a74a (patch) | |
tree | 0cacf340d84e198e64b30ca14a015a4a4973caf5 /lib/sqlalchemy/orm | |
parent | e2d9ef3fe6f7bd9b151caf71ae5eb7f15522ec8c (diff) | |
download | sqlalchemy-f02349336fa4470dbb5ca8e4d16031b8aa86a74a.tar.gz |
Handle mappings passed to ``execution_options``.
Fixed a bug in :meth:`_asyncio.AsyncSession.execute` and
:meth:`_asyncio.AsyncSession.stream` that required ``execution_options``
to be an instance of ``immutabledict`` when defined. It now
correctly accepts any mapping.
Fixes: #6943
Change-Id: Ic09de480dc2da1b0bdce25acb60b8f01371971f9
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r-- | lib/sqlalchemy/orm/persistence.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/session.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py index 4747d0bba..fd484b52b 100644 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@ -1833,7 +1833,7 @@ class BulkUDCompileState(CompileState): return ( statement, util.immutabledict(execution_options).union( - dict(_sa_orm_update_options=update_options) + {"_sa_orm_update_options": update_options} ), ) diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index af803a1b0..0bdd5cc95 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -1581,7 +1581,7 @@ class Session(_SessionClassMethods): :param execution_options: optional dictionary of execution options, which will be associated with the statement execution. This dictionary can provide a subset of the options that are accepted - by :meth:`_future.Connection.execution_options`, and may also + by :meth:`_engine.Connection.execution_options`, and may also provide additional options understood only in an ORM context. :param bind_arguments: dictionary of additional arguments to determine |