summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/pool.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - reduce some pool overheadMike Bayer2010-12-051-21/+26
|
* - ResultProxy and friends always reference the DBAPI connection at the same timeMike Bayer2010-12-051-38/+1
| | | | | | | | as the cursor. There is no reason for CursorFairy - the only use case would be, end-user is using the pool or pool.manage with DBAPI connections, uses a cursor, deferences the owning connection and continues using cursor. This is an almost nonexistent use case and isn't correct usage at a DBAPI level. Take out CursorFairy. - move the "check for a dot in the colname" logic out to the sqlite dialect.
* new calling style: event.listen(target, identifier, fn)Mike Bayer2010-12-011-1/+1
|
* - Pooling methods now underscored or removed:Mike Bayer2010-11-281-45/+29
| | | | | | | | | | | | | Pool.create_connection() -> Pool._create_connection() Pool.do_get() -> Pool._do_get() Pool.do_return_conn() -> Pool._do_return_conn() Pool.do_return_invalid() -> removed, was not used Pool.return_conn() -> Pool._return_conn() Pool.get() -> Pool._get(), public API is Pool.connect() SingletonThreadPool.cleanup() -> _cleanup() SingletonThreadPool.dispose_local() -> removed, use conn.invalidate() [ticket:1982]
* - NullPool is now used by default for SQLite file-Mike Bayer2010-11-281-6/+15
| | | | | | based databases. :memory: databases will continue to select SingletonThreadPool by default. [ticket:1921]
* - fixes for PG, mysql, twophaseMike Bayer2010-11-201-1/+11
| | | | | - added "pool_events" arg to create_engine(), "events" to pool, allowing establishment of listeners which fire before those of the dialect
* - logging has been overhauled such that engines no longer need to encode theMike Bayer2010-11-201-1/+1
|\ | | | | | | | | "hex id" string in their logging name in order to maintain separate loggers per engine. thanks to Vinay Sajip for assistance. merge of [ticket:1926]
| * - initial patch for [ticket:1926]Mike Bayer2010-11-171-1/+1
| |
* | dingMike Bayer2010-11-071-1/+1
| |
* | - reorganizationMike Bayer2010-09-141-77/+2
| | | | | | | | | | | | | | - attrbutes.py splits into attribtes.py and instrumentation.py - all the various Event subclasses go into events.py modules - some ideas for orm events - move *Extension out to deprecated_interfaces
* | - merge tip, 0.6.4 + 0.6.5Mike Bayer2010-09-141-1/+42
|\ \ | |/
| * - rewrote the "connections" sectionMike Bayer2010-09-051-1/+42
| | | | | | | | | | | | | | | | | | - improved pool docs - typos etc. - ClauseElement.execute() and scalar() make no sense - these are depreacted. The official home is Executable. - alias() is not executable, allowing it is sloppy so this goes under the deprecated umbrella
* | - its probably worthwhile to make the primary listen() interface humane, i.e.:Mike Bayer2010-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | def listen(target, args) so here we provide a "wrapper" approach that allows this, and it is basically pass-by-value. a pass-by-value event *may* support rewriting some of the args in the dictionary. the current listen will become "listen_raw" since it saves about 100% overhead versus the coercion to dict, and will be used internally, and will remain pass-by-reference. proxyconnection probably will rely upon the newer style of pass-by-value for "rewrite the args" types of calls.
* | this is not actually trueMike Bayer2010-08-101-1/+1
| |
* | this reorganizes things so the EventDescriptor and all is on a "Dispatch" ↵Mike Bayer2010-08-091-18/+18
| | | | | | | | | | | | | | | | | | object. this leaves the original Event class alone so sphinx documents it. this is all a mess right now but the pool/engine tests are working fully at the moment so wanted to mark a working version.
* | working with how this will be documented and having some probs with sphinxMike Bayer2010-08-091-74/+79
| |
* | - pretty much all tests passing, maybe some callcounts are offMike Bayer2010-07-251-5/+8
| | | | | | | | | | - test suite adjusted to use engine/pool events and not listeners - deprecation warnings
* | - worked it out so that classes declare a nested class "event",Mike Bayer2010-07-241-35/+87
| | | | | | | | | | | | | | | | | | with methods representing events. This is self-documenting via sphinx. - implemented new model for pool, classmanager. Most events are one or two args, so going back to allowing any kind of *arg, **kw signature for events - this is simpler and improves performance, though we don't get the "we can add new kw's anytime". perhaps there's some other way to approach that.
* | - initial "events" idea. will replace all Extension, Proxy, ListenerMike Bayer2010-07-241-56/+60
|/ | | | implementations with a single interface.
* - more 78 charsMike Bayer2010-07-101-24/+45
| | | | | - BIGINT doc - clean up docs in schema.py
* - verbiage expressing that pool_size==0 means no limit; NullPool isMike Bayer2010-07-021-5/+8
| | | | used to disable pooling. [ticket:1164]
* - Pool classes will reuse the same "pool_logging_name" settingMike Bayer2010-05-301-1/+9
| | | | | | | | | | | | | | | | | | | | after a dispose() occurs. - Engine gains an "execution_options" argument and update_execution_options() method, which will apply to all connections generated by this engine. - Added more aggressive caching to the mapper's usage of UPDATE, INSERT, and DELETE expressions. Assuming the statement has no per-object SQL expressions attached, the expression objects are cached by the mapper after the first create, and their compiled form is stored persistently in a cache dictionary for the duration of the related Engine. - change #3 required change #1 so that we could test a set of mappers operating over the course of many engines without memory usage increase.
* - Fixed bug in connection pool cursor wrapper whereby if aMike Bayer2010-04-281-1/+1
| | | | | cursor threw an exception on close(), the logging of the message would fail. [ticket:1786]
* - StaticPool now initializes, disposes and recreates withoutMike Bayer2010-03-191-31/+8
| | | | | | opening a new connection - the connection is only opened when first requested. dispose() also works on AssertionPool now. [ticket:1728]
* - Added "logging_name" argument to create_engine(), Pool() constructorMike Bayer2010-03-131-4/+12
| | | | | | | as well as "pool_logging_name" argument to create_engine() which filters down to that of Pool. Issues the given string name within the "name" field of logging messages instead of the default hex identifier string. [ticket:1555]
* fix the timeout test once and for allMike Bayer2010-03-131-28/+41
|
* - orm: Removed a lot of logging that nobody really cares about,Mike Bayer2010-02-281-36/+23
| | | | | | | | | | | | logging that remains will respond to live changes in the log level. No significant overhead is added. [ticket:1719] - engine: Opened up logging a bit such that isEnabledFor() is called more often, so that changes to the log level for engine/pool will be reflected on next connect. This adds a small amount of method call overhead. It's negligible and will make life a lot easier for all those situations when logging just happens to be configured after create_engine() is called. [ticket:1719]
* happy new yearMike Bayer2010-01-071-1/+1
|
* - The cursor associated with connection pool connectionsMike Bayer2009-12-031-1/+4
| | | | | (i.e. _CursorFairy) now proxies `__iter__()` to the underlying cursor correctly. [ticket:1632]
* fix StaticPool [ticket:1615]Mike Bayer2009-11-121-3/+5
|
* allow setattr() access to _CursorFairy directly, thereby removing the need ↵Mike Bayer2009-11-061-4/+10
| | | | for dialects to guess whether they have a wrapped cursor or not, fixes #1609, regression from r6471
* - Connection pool logging now uses both INFO and DEBUGMike Bayer2009-11-031-34/+34
| | | | | | | log levels for logging. INFO is for major events such as invalidated connections, DEBUG for all the acquire/return logging. `echo_pool` can be False, None, True or "debug" the same way as `echo` works.
* use *args with log.debug()/log.info(), [ticket:1520]Mike Bayer2009-08-261-13/+13
|
* merge 0.6 series to trunk.Mike Bayer2009-08-061-71/+57
|
* Implemented recreate() for StaticPoolJason Kirtland2009-07-101-3/+13
|
* removed needless "thread" imports from utilMike Bayer2009-05-301-1/+1
|
* happy new yearMike Bayer2009-01-121-1/+1
|
* - Added a mutex for the initial pool creation whenMike Bayer2008-12-271-5/+13
| | | | | | using pool.manage(dbapi). This prevents a minor case of "dogpile" behavior which would otherwise occur upon a heavy load startup. [ticket:799]
* - NullPool supports reconnect on failure behavior.Mike Bayer2008-12-271-0/+12
| | | | [ticket:1094]
* merged -r5299:5438 of py3k warnings branch. this fixes some sqlite py2.6 ↵Mike Bayer2008-12-181-2/+2
| | | | | | | | testing issues, and also addresses a significant chunk of py3k deprecations. It's mainly expicit __hash__ methods. Additionally, most usage of sets/dicts to store columns uses util-based placeholder names.
* - added sphinx handler to allow __init__ methods throughMike Bayer2008-12-171-15/+12
| | | | | | - sqlite module documentation - some corrections to pool docs - the example in URL.translate_connect_args() never made any sense anyway so removed it
* - convert __init__ and :members: to be compatible with autoclass_content='both'Mike Bayer2008-12-071-7/+12
|
* - merged -r5338:5429 of sphinx branch.Mike Bayer2008-12-061-94/+185
| | | | | | | | | | | | | - Documentation has been converted to Sphinx. In particular, the generated API documentation has been constructed into a full blown "API Reference" section which organizes editorial documentation combined with generated docstrings. Cross linking between sections and API docs are vastly improved, a javascript-powered search feature is provided, and a full index of all classes, functions and members is provided.
* call count pinata partyMike Bayer2008-10-231-2/+3
|
* the @property / __slots__ fairy pays a visitMike Bayer2008-10-011-0/+4
|
* ugh...try againMike Bayer2008-08-271-1/+2
|
* critical fix to r5028 repairs SingleThreadPool to return a connection in ↵Mike Bayer2008-08-271-7/+9
| | | | case one had been removed via cleanup()
* dont rely upon AttributeError to test for NoneMike Bayer2008-08-131-4/+8
|
* - with 2.3 support dropped,Mike Bayer2008-08-131-46/+42
| | | | | | all usage of thread.get_ident() is removed, and replaced with threading.local() usage. this allows potentially faster and safer thread local access.
* Corrected docstring for Pool class to show that the default value for ↵Michael Trier2008-07-021-1/+1
| | | | use_threadlocal is False. closes #1095.