diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-07-08 10:42:20 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-07-08 10:42:20 -0400 |
| commit | 3238d953b42f67761dc3019bd27f2960ae2e525f (patch) | |
| tree | f90962b324be393a1b9130b4de01040fea4a38d0 /lib/sqlalchemy/engine/base.py | |
| parent | dd453e19a79785e91463cd2b37d12a1d0f36c03a (diff) | |
| download | sqlalchemy-3238d953b42f67761dc3019bd27f2960ae2e525f.tar.gz | |
Ensure .engine is part of Connectable interface, implement as descriptor
Fixed bug where using reflection function such as :meth:`.MetaData.reflect`
with an :class:`.Engine` object that had execution options applied to it
would fail, as the resulting :class:`.OptionEngine` proxy object failed to
include a ``.engine`` attribute used within the reflection routines.
Fixes: #4754
Change-Id: I6c342af5c6db6fe362b9d25f3f26d6859f62f87a
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 7aee1a73b..07d1b8f89 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1899,13 +1899,16 @@ class Engine(Connectable, log.Identified): if logging_name: self.logging_name = logging_name self.echo = echo - self.engine = self log.instance_logger(self, echoflag=echo) if proxy: interfaces.ConnectionProxy._adapt_listener(self, proxy) if execution_options: self.update_execution_options(**execution_options) + @property + def engine(self): + return self + def update_execution_options(self, **opt): r"""Update the default execution_options dictionary of this :class:`.Engine`. |
