]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Engine and TLEngine assume "threadlocal" behavior on Pool; both use connect()
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Aug 2007 19:07:07 +0000 (19:07 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Aug 2007 19:07:07 +0000 (19:07 +0000)
commit531faf0e187d756bda92a937a77accd86b813339
treeb9536fe6cafbdeda5d454f26fed0f06982c87541
parentbe16b15f2c0dc33f2491fc6ad1de0f11b1f6c7d4
- Engine and TLEngine assume "threadlocal" behavior on Pool; both use connect()
for contextual connection, unique_connection() for non-contextual.
- Pool use_threadlocal defaults to True, can be set to false at create_engine()
level with pool_threadlocal=False
- made all logger statements in pool conditional based on a flag calcualted once.
- chagned WeakValueDictionary() used for "threadlocal" pool to be a regular dict
referencing weakref objects.  WVD had a lot of overhead, apparently.  *CAUTION* -
im pretty confident about this change, as the threadlocal dict gets explicitly managed
anyway, tests pass with PG etc., but keep a close eye on this one regardless.
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/strategies.py
lib/sqlalchemy/engine/threadlocal.py
lib/sqlalchemy/pool.py
test/engine/pool.py