diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-04-11 14:21:13 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-07-15 22:48:47 -0400 |
| commit | dfb20f07d8796ec27732df84c40b4ce4857fd83b (patch) | |
| tree | b1dbb5180db5ec218b1c8ad9a6b9bd5cc0bfadf9 /lib/sqlalchemy/orm/session.py | |
| parent | 26ef5ed862270bda4ab6abe544add9f8bb7ac72f (diff) | |
| download | sqlalchemy-dfb20f07d8796ec27732df84c40b4ce4857fd83b.tar.gz | |
Remove threadlocal engine strategy, engine strategies pool threadlocal
The "threadlocal" execution strategy, deprecated in 1.3, has been
removed for 1.4, as well as the concept of "engine strategies" and the
``Engine.contextual_connect`` method. The "strategy='mock'" keyword
argument is still accepted for now with a deprecation warning; use
:func:`.create_mock_engine` instead for this use case.
Fixes: #4632
Change-Id: I8a351f9fa1f7dfa2a56eec1cd2d1a4b9d65765a2
(cherry picked from commit b368c49b44c5716d93c7428ab22b6761c6ca7cf5)
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 558def854..5ff390e19 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -429,7 +429,7 @@ class SessionTransaction(object): "given Connection's Engine" ) else: - conn = bind._contextual_connect() + conn = bind.connect() if execution_options: conn = conn.execution_options(**execution_options) @@ -1131,7 +1131,7 @@ class Session(_SessionClassMethods): engine, execution_options ) else: - conn = engine._contextual_connect(**kw) + conn = engine.connect(**kw) if execution_options: conn = conn.execution_options(**execution_options) return conn |
