From 4c17299e74c6d07f81f3416a7e1ff809a79c03d0 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Wed, 10 Jan 2024 19:30:53 +0100 Subject: [PATCH] remove unnecessary execution_options.merge_with in _execute_ddl Change-Id: Idcd886bf6ad5db28c4dc581a7f1e91e12f6f9a05 (cherry picked from commit 396b1e621f0576b2df9da8b728a21abc99951901) --- lib/sqlalchemy/engine/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 6d8cc66704..dcce3ed342 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1498,7 +1498,7 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): ) -> CursorResult[Any]: """Execute a schema.DDL object.""" - execution_options = ddl._execution_options.merge_with( + exec_opts = ddl._execution_options.merge_with( self._execution_options, execution_options ) @@ -1512,12 +1512,11 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): event_multiparams, event_params, ) = self._invoke_before_exec_event( - ddl, distilled_parameters, execution_options + ddl, distilled_parameters, exec_opts ) else: event_multiparams = event_params = None - exec_opts = self._execution_options.merge_with(execution_options) schema_translate_map = exec_opts.get("schema_translate_map", None) dialect = self.dialect @@ -1530,7 +1529,7 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): dialect.execution_ctx_cls._init_ddl, compiled, None, - execution_options, + exec_opts, compiled, ) if self._has_events or self.engine._has_events: @@ -1539,7 +1538,7 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): ddl, event_multiparams, event_params, - execution_options, + exec_opts, ret, ) return ret -- 2.47.2