summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util
Commit message (Collapse)AuthorAgeFilesLines
* - Made a slight adjustment to the logic which waits for a pooledMike Bayer2013-12-061-2/+8
| | | | | | | | | | | connection to be available, such that for a connection pool with no timeout specified, it will every half a second break out of the wait to check for the so-called "abort" flag, which allows the waiter to break out in case the whole connection pool was dumped; normally the waiter should break out due to a notify_all() but it's possible this notify_all() is missed in very slim cases. This is an extension of logic first introduced in 0.8.0, and the issue has only been observed occasionally in stress tests.
* Fix a typo: evaluted -> evaluated.pr/32Hyunjun Kim2013-10-081-1/+1
|
* - add WeakSequence.append()Mike Bayer2013-08-181-3/+10
| | | | - fix and test weakref cleanout for WeakSequence, [ticket:2794]
* fix the mergeMike Bayer2013-08-181-4/+0
|
* Fixed a potential issue in an ordered sequence implementation usedMike Bayer2013-08-181-4/+13
| | | | | | | | | | | by the ORM to iterate mapper hierarchies; under the Jython interpreter this implementation wasn't ordered, even though cPython and Pypy maintained ordering. Also in 0.8.3. [ticket:2794] Conflicts: doc/build/changelog/changelog_09.rst lib/sqlalchemy/util/_collections.py
* fix py26 flagMike Bayer2013-07-272-1/+2
|
* don't split the regexps for chop_traceback()Mike Bayer2013-07-121-4/+2
|
* Dialect.initialize() is not called a second time if an :class:`.Engine`Mike Bayer2013-07-112-1/+16
| | | | | | is recreated, due to a disconnect error. This fixes a particular issue in the Oracle 8 dialect, but in general the dialect.initialize() phase should only be once per dialect. [ticket:2776]
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-302-1/+3
| | | | | | | | | | | | actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
* refactor test suites for postgresql, mssql, mysql into packages.Mike Bayer2013-06-282-2/+32
|
* add the py2k symbol from the 0.9 branch to support the hstore changeMike Bayer2013-05-292-1/+2
|
* Fixed a bug where the routine to detect the correct kwargsMike Bayer2013-05-231-24/+22
| | | | | | being sent to :func:`.create_engine` would fail in some cases, such as with the Sybase dialect. [ticket:2732]
* python2.5 fixMike Bayer2013-04-181-3/+2
|
* - remove reference to _exc_info before reraise to reduce cyclesMike Bayer2013-04-181-0/+3
|
* Reworked internal exception raises that emitMike Bayer2013-04-183-2/+58
| | | | | | | | | a rollback() before re-raising, so that the stack trace is preserved from sys.exc_info() before entering the rollback. This so that the traceback is preserved when using coroutine frameworks which may have switched contexts before the rollback function returns. [ticket:2703]
* A major fix to the way in which a select() object producesMike Bayer2013-04-111-1/+0
| | | | | | | | | | | | | | | | | | | labeled columns when apply_labels() is used; this mode produces a SELECT where each column is labeled as in <tablename>_<columnname>, to remove column name collisions for a multiple table select. The fix is that if two labels collide when combined with the table name, i.e. "foo.bar_id" and "foo_bar.id", anonymous aliasing will be applied to one of the dupes. This allows the ORM to handle both columns independently; previously, 0.7 would in some cases silently emit a second SELECT for the column that was "duped", and in 0.8 an ambiguous column error would be emitted. The "keys" applied to the .c. collection of the select() will also be deduped, so that the "column being replaced" warning will no longer emit for any select() that specifies use_labels, though the dupe key will be given an anonymous label which isn't generally user-friendly. [ticket:2702]
* Make MonkeyPatchedBinaryTest not fail on Python 2.5 (which doesn't haveMarc Abramowitz2013-03-201-0/+8
| | | | the `b` notation for byte string literals)
* - remove all compat items that are pre-2.5 (hooray)Mike Bayer2013-03-095-189/+50
| | | | | | - other cleanup - don't need compat.decimal, that approach never panned out. hopefully outside libs aren't pulling it in, they shouldn't be
* happy new year (see #2645)Diana Clarke2013-01-017-7/+7
|
* Fixed a regression caused by :ticket:`2410` whereby aMike Bayer2012-12-111-4/+6
| | | | | | | | | :class:`.CheckConstraint` would apply itself back to the original table during a :meth:`.Table.tometadata` operation, as it would parse the SQL expression for a parent table. The operation now copies the given expression to correspond to the new table. [ticket:2633]
* - documentation and changelog for [ticket:2601]Mike Bayer2012-12-091-9/+57
|
* just a pep8 pass of lib/sqlalchemy/util/Diana Clarke2012-11-196-17/+79
|
* just a pep8 pass of this fileDiana Clarke2012-11-181-13/+32
|
* initializing _labels to an empty list so that the other methods don't throw ↵Diana Clarke2012-11-171-0/+1
| | | | exceptions in the None labels case, but rather return (), [], or {}. this is not backwards compatible, but doubt anyone is relying on those exceptions #2601
* adding _fields, _asdict() to KeyedTuple #2601Diana Clarke2012-11-171-0/+7
|
* __sub__ was declared twice, just increasing test coverage before I change ↵Diana Clarke2012-11-131-3/+0
| | | | anything
* - move most/all operator specific tests into test_operator, convert fully to TOTMike Bayer2012-10-242-1/+2
|
* - [bug] TypeDecorator now includes a generic repr()Mike Bayer2012-10-181-2/+4
| | | | | | | | | that works in terms of the "impl" type by default. This is a behavioral change for those TypeDecorator classes that specify a custom __init__ method; those types will need to re-define __repr__() if they need __repr__() to provide a faithful constructor representation. [ticket:2594]
* - fix annotation transfer when producing m2m backref, [ticket:2578]Mike Bayer2012-09-281-0/+3
|
* - use our new Cls.memoized_name._reset(self) method in place of all those ↵Mike Bayer2012-09-232-4/+1
| | | | | | __dict__.pop(), remove reset_memoized
* - [bug] When the primary key column of a TableMike Bayer2012-09-231-0/+2
| | | | | | | | is replaced, such as via extend_existing, the "auto increment" column used by insert() constructs is reset. Previously it would remain referring to the previous primary key column. [ticket:2525]
* - rework the test exclusions system to work on a consistent themeMike Bayer2012-09-032-2/+3
|
* Add items(), values() methods to Properties.Michael Elsdörfer2012-08-291-0/+6
|
* - [feature] The Core oeprator system now includesMike Bayer2012-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the `getitem` operator, i.e. the bracket operator in Python. This is used at first to provide index and slice behavior to the Postgresql ARRAY type, and also provides a hook for end-user definition of custom __getitem__ schemes which can be applied at the type level as well as within ORM-level custom operator schemes. Note that this change has the effect that descriptor-based __getitem__ schemes used by the ORM in conjunction with synonym() or other "descriptor-wrapped" schemes will need to start using a custom comparator in order to maintain this behavior. - [feature] postgresql.ARRAY now supports indexing and slicing. The Python [] operator is available on all SQL expressions that are of type ARRAY; integer or simple slices can be passed. The slices can also be used on the assignment side in the SET clause of an UPDATE statement by passing them into Update.values(); see the docs for examples. - [feature] Added new "array literal" construct postgresql.array(). Basically a "tuple" that renders as ARRAY[1,2,3].
* - [bug] Fixed the repr() of Enum to includeMike Bayer2012-08-081-1/+10
| | | | | the "name" and "native_enum" flags. Helps Alembic autogenerate.
* more import cleanupsMike Bayer2012-08-077-15/+12
|
* -whitespace bonanza, contdMike Bayer2012-07-282-6/+6
|
* - document the inspection systemMike Bayer2012-07-181-13/+16
|
* adjust the compat namedtuple to handle subclassingMike Bayer2012-07-171-3/+3
|
* - justify NamedTuple, now called KeyedTupleMike Bayer2012-07-162-3/+12
| | | | - fix this test
* - [feature] *Very limited* support forMike Bayer2012-07-143-12/+47
| | | | | | | | | | | | | | inheriting mappers to be GC'ed when the class itself is deferenced. The mapper must not have its own table (i.e. single table inh only) without polymorphic attributes in place. This allows for the use case of creating a temporary subclass of a declarative mapped class, with no table or mapping directives of its own, to be garbage collected when dereferenced by a unit test. [ticket:2526]
* notify_all workaround for 2.5Mike Bayer2012-06-251-1/+10
|
* add 2.5 compat for next()Mike Bayer2012-06-252-1/+6
|
* - change notify to notify_all() so all waiters exit immediately,Mike Bayer2012-06-251-1/+1
| | | | continuing [ticket:2522]
* - [moved] The InstrumentationManager interfaceMike Bayer2012-06-243-88/+16
| | | | | | | | | | | | | and the entire related system of alternate class implementation is now moved out to sqlalchemy.ext.instrumentation. This is a seldom used system that adds significant complexity and overhead to the mechanics of class instrumentation. The new architecture allows it to remain unused until InstrumentationManager is actually imported, at which point it is bootstrapped into the core.
* - [bug] Fixed bug wherebyMike Bayer2012-06-221-3/+37
| | | | | | | | | | | | a disconnect detect + dispose that occurs when the QueuePool has threads waiting for connections would leave those threads waiting for the duration of the timeout on the old pool. The fix now notifies those waiters with a special exception case and has them move onto the new pool. This fix may or may not be ported to 0.7. [ticket:2522]
* - [feature] The of_type() construct on attributesMike Bayer2012-06-202-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | now accepts aliased() class constructs as well as with_polymorphic constructs, and works with query.join(), any(), has(), and also eager loaders subqueryload(), joinedload(), contains_eager() [ticket:2438] [ticket:1106] - a rewrite of the query path system to use an object based approach for more succinct usage. the system has been designed carefully to not add an excessive method overhead. - [feature] select() features a correlate_except() method, auto correlates all selectables except those passed. Is needed here for the updated any()/has() functionality. - remove some old cruft from LoaderStrategy, init(),debug_callable() - use a namedtuple for _extended_entity_info. This method should become standard within the orm internals - some tweaks to the memory profile tests, number of runs can be customized to work around pysqlite's very annoying behavior - try to simplify PropertyOption._get_paths(), rename to _process_paths(), returns a single list now. overall works more completely as was needed for of_type() functionality
* - [feature] Added a new systemMike Bayer2012-04-242-1/+40
| | | | | | | for registration of new dialects in-process without using an entrypoint. See the docs for "Registering New Dialects". [ticket:2462]
* - merge attribute flag overhaul for [ticket:2358]Mike Bayer2012-04-231-7/+13
|
* - [feature] Added "no_autoflush" contextMike Bayer2012-02-252-1/+7
| | | | | manager to Session, used with with: will temporarily disable autoflush.