summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/strategies.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/engine/strategies.py')
-rw-r--r--lib/sqlalchemy/engine/strategies.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/lib/sqlalchemy/engine/strategies.py b/lib/sqlalchemy/engine/strategies.py
index 7d85de9ad..0c59ee8eb 100644
--- a/lib/sqlalchemy/engine/strategies.py
+++ b/lib/sqlalchemy/engine/strategies.py
@@ -4,13 +4,11 @@ By default there are two, one which is the "thread-local" strategy,
one which is the "plain" strategy.
New strategies can be added via constructing a new EngineStrategy
-object which will add itself to the list of available strategies here,
-or replace one of the existing name. this can be accomplished via a
-mod; see the sqlalchemy/mods package for details.
+object which will add itself to the list of available strategies.
"""
-from sqlalchemy.engine import base, default, threadlocal, url
+from sqlalchemy.engine import base, threadlocal, url
from sqlalchemy import util, exceptions
from sqlalchemy import pool as poollib
@@ -92,8 +90,6 @@ class DefaultEngineStrategy(EngineStrategy):
else:
pool = pool
- provider = self.get_pool_provider(u, pool)
-
# create engine.
engineclass = self.get_engine_cls()
engine_args = {}
@@ -105,14 +101,11 @@ class DefaultEngineStrategy(EngineStrategy):
if len(kwargs):
raise TypeError("Invalid argument(s) %s sent to create_engine(), using configuration %s/%s/%s. Please check that the keyword arguments are appropriate for this combination of components." % (','.join(["'%s'" % k for k in kwargs]), dialect.__class__.__name__, pool.__class__.__name__, engineclass.__name__))
- return engineclass(provider, dialect, **engine_args)
+ return engineclass(pool, dialect, u, **engine_args)
def pool_threadlocal(self):
raise NotImplementedError()
- def get_pool_provider(self, url, pool):
- raise NotImplementedError()
-
def get_engine_cls(self):
raise NotImplementedError()
@@ -123,9 +116,6 @@ class PlainEngineStrategy(DefaultEngineStrategy):
def pool_threadlocal(self):
return False
- def get_pool_provider(self, url, pool):
- return default.PoolConnectionProvider(url, pool)
-
def get_engine_cls(self):
return base.Engine
@@ -138,9 +128,6 @@ class ThreadLocalEngineStrategy(DefaultEngineStrategy):
def pool_threadlocal(self):
return True
- def get_pool_provider(self, url, pool):
- return threadlocal.TLocalConnectionProvider(url, pool)
-
def get_engine_cls(self):
return threadlocal.TLEngine
@@ -195,4 +182,4 @@ class MockEngineStrategy(EngineStrategy):
def execute(self, object, *multiparams, **params):
raise NotImplementedError()
-MockEngineStrategy() \ No newline at end of file
+MockEngineStrategy()