summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/threadlocal.py
Commit message (Collapse)AuthorAgeFilesLines
* Better hide engine passwordValery Yundin2017-01-161-1/+1
| | | | | | | | | | Avoid putting engine password in the exception message in `MetaData.reflect` (since exception messages often appear in logs). Use the same redacted `__repr__` implementation in `TLEngine` as in its base class `Engine` Change-Id: Ic0a7baea917a9c8d87dffdd82ef566673ab08e02 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/327
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - simplify the "noconnection" error handling, settingMike Bayer2014-12-081-1/+1
| | | | | | | _handle_dbapi_exception_noconnection() to only invoke in the case of raw_connection() in the constructor of Connection. in all other cases the Connection proceeds with _handle_dbapi_exception() including revalidate.
* - adjust _revalidate_connection() again such that we pass a _wrap=FalseMike Bayer2014-12-051-1/+4
| | | | | | | | | | to it, so that we say we will do the wrapping just once right here in _execute_context() / _execute_default(). An adjustment is made to _handle_dbapi_error() to not assume self.__connection in case we are already in an invalidated state further adjustment to 0639c199a547343d62134d2f233225fd2862ec45, 41e7253dee168b8c26c49, #3266
* - The engine-level error handling and wrapping routines will nowMike Bayer2014-12-051-1/+1
| | | | | | | | | take effect in all engine connection use cases, including when user-custom connect routines are used via the :paramref:`.create_engine.creator` parameter, as well as when the :class:`.Connection` encounters a connection error on revalidation. fixes #3266
* PEP8 style fixesBrian Jarrett2014-07-131-5/+5
|
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - happy new yearMike Bayer2014-01-051-1/+1
|
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* just a pep8 pass of lib/sqlalchemy/engine/Diana Clarke2012-11-191-10/+18
|
* - break out engine/base.py into base, interfaces, result, util.Mike Bayer2012-08-071-2/+2
| | | | - remove deprecated 0.7 engine methods
* -whitespace bonanza, contdMike Bayer2012-07-281-1/+1
|
* happy new yearMike Bayer2012-01-041-1/+1
|
* - some doc reorgMike Bayer2011-03-171-2/+2
| | | | | | | | | | - change engine.Connection to _connection_cls so sphinx doesn't get upset - globally add "." to all :class:`Foo` - start naming sections that are mostly docstrings "API Documentation - blah blah" - move some ad-hoc docstrings into "API" sections, there is some inconsistency here and it may be that we just have to leave it that way - add "internals" rsts to core, orm, I'm not super thrilled how these look but they are targeted by some of the public api docs, users typically become aware of these anyway
* - rename EngineEvents to ConnectionEventsMike Bayer2011-02-171-11/+1
| | | | | | | | - simplify connection event model to be inline inside Connection, don't use ad-hoc subclasses (technically would leak memory for the app that keeps creating engines and adding events) - not doing listen-per-connection yet. this is closer. overall things are much simpler now (until we put listen-per-connection in...)
* - merge r43460573c27a:4993c7eae8e5d117ff342bdc59f3b0635b898e2c of 0.6 branchMike Bayer2011-01-081-0/+12
|
* - whitespace removal bonanzaMike Bayer2011-01-021-14/+14
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* - they don't want "on_". First step, change the naming convention on EventsMike Bayer2010-12-301-2/+2
| | | | so that non-events are just _name.
* - further fixes to no trans in progress, no trans ever for TLEngine, ↵Mike Bayer2010-12-091-3/+6
| | | | [ticket:1998]
* - Threadlocal engine methods rollback(), commit(),Mike Bayer2010-12-081-1/+7
| | | | | prepare() won't raise if no transaction is in progress; this was a regression introduced in 0.6. [ticket:1998]
* new calling style: event.listen(target, identifier, fn)Mike Bayer2010-12-011-2/+2
|
* - reorganizationMike Bayer2010-09-141-3/+3
| | | | | | | - 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
* - moved out to on_before_execute, on_after_execute. not much option here,Mike Bayer2010-08-291-2/+2
| | | | | need both forms, the wrapping thing is just silly - fixed the listen() to not re-wrap continuously.
* this reorganizes things so the EventDescriptor and all is on a "Dispatch" ↵Mike Bayer2010-08-091-10/+10
| | | | | | | | | 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.
* - pretty much all tests passing, maybe some callcounts are offMike Bayer2010-07-251-8/+12
| | | | | - test suite adjusted to use engine/pool events and not listeners - deprecation warnings
* - initial "events" idea. will replace all Extension, Proxy, ListenerMike Bayer2010-07-241-7/+8
| | | | implementations with a single interface.
* - Pool classes will reuse the same "pool_logging_name" settingMike Bayer2010-05-301-1/+2
| | | | | | | | | | | | | | | | | | | | 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.
* - threadlocal engine wasn't properly closing the connectionMike Bayer2010-02-271-0/+2
| | | | | | | | | | upon close() - fixed that. - Transaction object doesn't rollback or commit if it isn't "active", allows more accurate nesting of begin/rollback/commit. - Added basic support for mxODBC [ticket:1710]. - Python unicode objects as binds result in the Unicode type, not string, thus eliminating a certain class of unicode errors on drivers that don't support unicode binds.
* - the "threadlocal" engine has been rewritten and simplifiedMike Bayer2010-01-241-173/+57
| | | | and now supports SAVEPOINT operations.
* merge 0.6 series to trunk.Mike Bayer2009-08-061-1/+3
|
* removed needless "thread" imports from utilMike Bayer2009-05-301-1/+1
|
* - merged -r5338:5429 of sphinx branch.Mike Bayer2008-12-061-1/+1
| | | | | | | | | | | | | - 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.
* raise NotImplemented for begin_nested()Mike Bayer2008-05-141-1/+7
|
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-3/+12
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* - implemented two-phase API for "threadlocal" engine,Mike Bayer2008-02-261-9/+7
| | | | | via engine.begin_twophase(), engine.prepare() [ticket:936]
* introductory docstring bonanzaMike Bayer2007-12-181-5/+6
|
* - cleanup; lambdas removed from properties; properties mirror same-named ↵Mike Bayer2007-12-181-5/+13
| | | | | | functions (more like eventual decorator syntax); remove some old methods, factor out some "raiseerr" ugliness to outer lying functions. - corresponding_column() integrates "require_embedded" flag with other set arithmetic
* fixed the previous TLTransaction checkinMike Bayer2007-11-071-0/+2
|
* - fixed the close() method on Transaction when using strategy='threadlocal'Mike Bayer2007-11-071-1/+8
|
* - Engine and TLEngine assume "threadlocal" behavior on Pool; both use connect()Mike Bayer2007-08-201-18/+3
| | | | | | | | | | | 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.
* - Connection.begin() no longer accepts nested=True, a possible source of ↵Jason Kirtland2007-08-191-25/+30
| | | | | | confusion as two forms of nesting are supported. SAVEPOINT-style nesting logic is now contained soley in begin_nested(). - Docstring love for the engine package. More is needed.
* - threadlocal TLConnection, when closes for real, forces parent TLSessionMike Bayer2007-08-171-0/+6
| | | | to rollback/dispose of transaction
* - turned twophase=True on in testMike Bayer2007-08-171-0/+3
| | | | - TLEngine raises notimplemented for two-phase
* - added extra argument con_proxy to ConnectionListener interface ↵Mike Bayer2007-08-171-13/+44
| | | | | | | | | | 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
* - moved test/orm/fixtures.py to testlibMike Bayer2007-08-161-6/+6
| | | | | | | - flattened mapper calls in _instance() to operate directly through a default MapperExtension - more tests for ScopedSession, fixed [ticket:746] - threadlocal engine propagates **kwargs through begin()
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-15/+8
| | | | maintenance branch in branches/rel_0_3.
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-15/+54
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax