summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/pool.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - zoomark/zoomark_orm seem to work with pool_threadlocal turned off, ↵Mike Bayer2008-05-191-1/+0
| | | | | | [ticket:1050] becomes WORKSFORME - fixed probably errenous unique=True checkin on unitofwork.py
* pool_threadlocal is off by default [ticket:1049]Mike Bayer2008-05-191-1/+2
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-12/+12
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* Renamed rollback_returned to reset_on_return. Future, dialect-aware pools ↵Jason Kirtland2008-05-051-8/+13
| | | | can do better than rollback for this function.
* - added "rollback_returned" option to Pool which willMike Bayer2008-05-051-2/+4
| | | | | | disable the rollback() issued when connections are returned. This flag is only safe to use with a database which does not support transactions (i.e. MySQL/MyISAM).
* - Pool listeners may now be specified as a duck-type of PoolListener or a ↵Jason Kirtland2008-04-041-5/+15
| | | | dict of callables, your choice.
* - Revamped the Connection memoize decorator a bit, moved to engineJason Kirtland2008-04-021-15/+0
| | | | | - MySQL character set caching is more aggressive but will invalidate the cache if a SET is issued. - MySQL connection memos are namespaced: info[('mysql', 'server_variable')]
* - reverted previous "strings instead of tuples" change due to more specific ↵Mike Bayer2008-03-301-0/+15
| | | | | | test results showing tuples faster - changed cache decorator call on default_schema_name call to a connection.info specific one
* added dispose() for StaticPoolMike Bayer2008-03-021-0/+4
|
* - psycopg2 can raise un-str()able exceptions; don't croak when trying to log ↵Jason Kirtland2008-02-081-1/+6
| | | | them
* happy new yearMike Bayer2008-01-011-1/+1
|
* - Re-raise SystemExit et al in _ConnectionRecord.closeJason Kirtland2007-12-191-14/+20
| | | | - Little code cleanup- decreased verbosity of string formatting.
* - auto-reconnect support improved; a Connection can now automaticallyMike Bayer2007-12-191-1/+6
| | | | | | | | | | reconnect after its underlying connection is invalidated, without needing to connect() again from the engine. This allows an ORM session bound to a single Connection to not need a reconnect. Open transactions on the Connection must be rolled back after an invalidation of the underlying connection else an error is raised. Also fixed bug where disconnect detect was not being called for cursor(), rollback(), or commit().
* Migrated Connection.properties to Connection.info ('info' is the new ↵Jason Kirtland2007-11-181-11/+15
| | | | standard name for user-writable property collections that came out of [ticket:573]). 'properties' is now an alias, will be removed in 0.5.
* - Pool listeners preserved on pool.recreate()Jason Kirtland2007-11-101-71/+71
| | | | - Docstring rampage
* - inlined a couple of context variablesMike Bayer2007-10-271-1/+1
| | | | - PG two phase was calling text() without the correct bind param format, previous compiler checkin revealed issue
* restored WeakValueDict for threadlocal connections + profiler test, addressingMike Bayer2007-08-221-3/+6
| | | | [ticket:754]
* -removed echo_property() function, moved logging checks toMike Bayer2007-08-211-17/+15
| | | | static variables
* changing Pool to use weakref callback for auto-cleanup, instead of __del__.Mike Bayer2007-08-211-27/+32
| | | | | Still leaving the RLock in Queue however since I see no guarantee that the weakref callback isn't called at an arbitrary time.
* - Engine and TLEngine assume "threadlocal" behavior on Pool; both use connect()Mike Bayer2007-08-201-19/+31
| | | | | | | | | | | 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.
* light docstring tweaks to the poolJason Kirtland2007-08-191-37/+48
| | | | more pedantic DBAPI -> DB-API changes in docstrings
* - added extra argument con_proxy to ConnectionListener interface ↵Mike Bayer2007-08-171-2/+2
| | | | | | | | | | checkout/checkin methods - changed testing connection closer to work on _ConnectionFairy instances, resulting in pool checkins, not actual closes - disabled session two phase test for now, needs work - added some two-phase support to TLEngine, not tested - TLTransaction is now a wrapper
* Centralized some `try: import foo except: import other as foo` imports in utilJason Kirtland2007-08-131-9/+1
|
* Added an exception hierarchy shadowing DB-API exc typesJason Kirtland2007-08-111-1/+10
| | | | | | | No more generic SQLErrors wrappers- the shadow type matching the DB-API error is raised. [ticket:706] SQLError is now (also) DBAPIError. DBAPIError and subtype constructors will refuse to wrap a SystemExit or KeyboardInterrupt, returningthe original interrupt exception instead of a new instance. [ticket:689] Added a passthroughs for SE/KI exceptions in a couple except-and-discard situations
* -merged 0.3 pool threadlocal fix from r3139Mike Bayer2007-08-021-12/+6
|
* - removed auto_close_cursors and disallow_open_cursors arguments from Pool;Mike Bayer2007-07-291-41/+6
| | | | reduces overhead as cursors are normally closed by ResultProxy and Connection.
* Added pool hooks for connection creation, check out and check in.Jason Kirtland2007-07-281-3/+59
|
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-1/+21
| | | | maintenance branch in branches/rel_0_3.
* further adjustment to pool.getMike Bayer2007-07-201-2/+6
|
* - a new mutex that was added in 0.3.9 causes the pool_timeoutMike Bayer2007-07-201-2/+9
| | | | | | | feature to fail during a race condition; threads would raise TimeoutError immediately with no delay if many threads push the pool into overflow at the same time. this issue has been fixed.
* - adjustments to pool locking test to fail on OSXMike Bayer2007-06-301-7/+12
| | | | - restored conditional locking to pool, for all conditions of max_overflow > -1
* - added a mutex to QueuePool's "overflow" calculation to prevent a raceMike Bayer2007-06-301-6/+16
| | | | | | condition that can bypass max_overflow; merged from 0.4 branch r2736-2738. also made the locking logic simpler, tried to get the test to create a failure on OSX (not successful)
* added StaticPool, stores just one connection.Mike Bayer2007-06-091-0/+25
|
* propigated detach() and invalidate() methods to Connection.Mike Bayer2007-05-101-0/+13
|
* - Connections can be detached from their pool, closing on dereference ↵Jason Kirtland2007-05-091-1/+11
| | | | instead of returning to the pool for reuse
* added "recreate()" argument to connection pool classesMike Bayer2007-04-171-5/+30
| | | | | | | this method is called when the invalidate() occurs for a disconnect condition, so that the entire pool is recreated, thereby avoiding repeat errors on remaining connections in the pool. dispose() called as well (also fixed up) but cant guarantee all connections closed.
* for #516, moved the "disconnect check" step out of pool and back into ↵Mike Bayer2007-04-031-21/+1
| | | | | | base.py. dialects have is_disconnect() method now. simpler design which also puts control of the ultimate "execute" call back into the hands of the dialects.
* - merged the patch from #516 + fixesMike Bayer2007-04-021-21/+47
| | | | | | | | - improves the framework for auto-invalidation of connections that have lost their underlying database - the error catching/invalidate step is totally moved to the connection pool. - added better condition checking for do_rollback() and do_commit() including SQLError excepetion wrapping
* - merged the "execcontext" branch, refactors engine/dialect codepathsMike Bayer2007-04-021-4/+10
| | | | | | | | | | | | | | | | | | | | - much more functionality moved into ExecutionContext, which impacted the API used by dialects to some degree - ResultProxy and subclasses now designed sanely - merged patch for #522, Unicode subclasses String directly, MSNVarchar implements for MS-SQL, removed MSUnicode. - String moves its "VARCHAR"/"TEXT" switchy thing into "get_search_list()" function, which VARCHAR and CHAR can override to not return TEXT in any case (didnt do the latter yet) - implements server side cursors for postgres, unit tests, #514 - includes overhaul of dbapi import strategy #480, all dbapi importing happens in dialect method "dbapi()", is only called inside of create_engine() for default and threadlocal strategies. Dialect subclasses have a datamember "dbapi" referencing the loaded module which may be None. - added "mock" engine strategy, doesnt require DBAPI module and gives you a "Connecition" which just sends all executes to a callable. can be used to create string output of create_all()/drop_all().
* thank you, SVN, for being completely idiotic and non-intutive. rolling back ↵Mike Bayer2007-03-301-7/+2
| | | | incorrect checkin to trunk
* current progress with exec branchMike Bayer2007-03-291-2/+7
|
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-138/+226
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax
* r/m unused importJonathan Ellis2007-01-251-1/+1
|
* copyright updateMike Bayer2007-01-051-1/+1
|
* - fixed QueuePool bug whereby its better able to reconnect to a databaseMike Bayer2006-12-131-1/+5
| | | | that was not reachable, also fixed dispose() method
* cursors needs to be weak keyMike Bayer2006-12-081-1/+1
|
* - fix to connection pool _close() to properly clean up, fixesMike Bayer2006-12-081-14/+16
| | | | MySQL synchronization errors [ticket:387]
* - MySQL detects errors 2006 (server has gone away) and 2014Mike Bayer2006-12-081-4/+7
| | | | (commands out of sync) and invalidates the connection on which it occured.
* converted imports to absoluteMike Bayer2006-10-261-1/+1
|
* oops, removed pool debugging codeMike Bayer2006-10-241-7/+0
|