]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
echo_pool flag fixed
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 29 May 2006 16:49:42 +0000 (16:49 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 29 May 2006 16:49:42 +0000 (16:49 +0000)
removed incorrect paragraph regarding release modes

doc/build/content/dbengine.txt
lib/sqlalchemy/engine/strategies.py

index 85767bf14c59ee533ab414ff36334e34d26bf980..2193ab6b5de0d14337e7f63c19688ac30c817c83 100644 (file)
@@ -181,8 +181,6 @@ The `threadlocal` strategy is better suited to a programming style which relies
     # are returned to the pool.
     r2 = None
 
-While the `close()` method is still available with the "threadlocal" strategy, it should be used carefully.  Above, if we issued a `close()` call on `r1`, and then tried to further work with results from `r2`, `r2` would be in an invalid state since its connection was already returned to the pool.  By relying on `__del__()` to automatically clean up resources, this condition will never occur.
-
 Advantages to `threadlocal` include that resources can be left to clean up after themselves, application code can be more minimal, its guaranteed that only one connection is used per thread, and there is no chance of a "connection pool block", which is when an execution hangs because the current thread has already checked out all remaining resources.
 
 To get at the actual `Connection` object which is used by implicit executions, call the `contextual_connection()` method on `Engine`:
index 51496a67df4b70913c74895f0f24aca669bcdba5..d8b503add196abd59c7935d0787be9d05d5f2e53 100644 (file)
@@ -32,7 +32,7 @@ class PlainEngineStrategy(EngineStrategy):
         dialect = module.dialect(**kwargs)
 
         poolargs = {}
-        for key in (('echo', 'echo_pool'), ('pool_size', 'pool_size'), ('max_overflow', 'max_overflow'), ('poolclass', 'poolclass'), ('pool_timeout','timeout'), ('pool', 'pool')):
+        for key in (('echo_pool', 'echo'), ('pool_size', 'pool_size'), ('max_overflow', 'max_overflow'), ('poolclass', 'poolclass'), ('pool_timeout','timeout'), ('pool', 'pool')):
             if kwargs.has_key(key[0]):
                 poolargs[key[1]] = kwargs[key[0]]
         poolclass = getattr(module, 'poolclass', None)
@@ -54,7 +54,7 @@ class ThreadLocalEngineStrategy(EngineStrategy):
         dialect = module.dialect(**kwargs)
 
         poolargs = {}
-        for key in (('echo', 'echo_pool'), ('pool_size', 'pool_size'), ('max_overflow', 'max_overflow'), ('poolclass', 'poolclass'), ('pool_timeout','timeout'), ('pool', 'pool')):
+        for key in (('echo_pool', 'echo'), ('pool_size', 'pool_size'), ('max_overflow', 'max_overflow'), ('poolclass', 'poolclass'), ('pool_timeout','timeout'), ('pool', 'pool')):
             if kwargs.has_key(key[0]):
                 poolargs[key[1]] = kwargs[key[0]]
         poolclass = getattr(module, 'poolclass', None)