summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/_collections.py
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed bug in "to_list" conversion where a single bytes objectMike Bayer2016-02-211-2/+4
| | | | | | | would be turned into a list of individual characters. This would impact among other things using the :meth:`.Query.get` method on a primary key that's a bytes object. fixes #3660
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - The "lightweight named tuple" used when a :class:`.Query` returnsMike Bayer2015-05-141-0/+2
| | | | | | | | rows failed to implement ``__slots__`` correctly such that it still had a ``__dict__``. This is resolved, but in the extremely unlikely case someone was assigning values to the returned tuples, that will no longer work. fixes #3420
* - Fixed unexpected-use regression where in the odd case that theMike Bayer2015-05-061-0/+13
| | | | | | | | | | primaryjoin of a relationship involved comparison to an unhashable type such as an HSTORE, lazy loads would fail due to a hash-oriented check on the statement parameters, modified in 1.0 as a result of :ticket:`3061` to use hashing and modified in :ticket:`3368` to occur in cases more common than "load on pending". The values are now checked for the ``__hash__`` attribute beforehand. fixes #3416
* micro-optimize unique_listpr/169Gaëtan de Menten2015-04-241-3/+4
| | | This makes unique_list approx 2x faster in my (simple) tests
* - keep this as 100Mike Bayer2015-03-101-1/+1
|
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - reduce some callcounts related to the lightweight tuple,Mike Bayer2015-03-091-29/+56
| | | | | | basically by caching them. - improve LRUCache so that size management only proceeds in one thread, add a real get() method
* - pick around gaining modest dings in callcounts here and thereMike Bayer2015-03-091-5/+13
|
* - remove context-specific post-crud logic from Connection and inline post-crudMike Bayer2015-01-251-2/+7
| | | | | | | | | | logic to some degree in DefaultExecutionContext. In particular we are removing post_insert() which doesn't appear to be used based on a survey of prominent third party dialects. Callcounts aren't added to existing execute profiling tests and inserts might be a little better. - simplify the execution_options join in DEC. Callcounts don't appear affected.
* - add MemoizedSlots, a generalized solution to using __getattr__Mike Bayer2015-01-051-3/+14
| | | | | for memoization on a class that uses slots. - apply many more __slots__. mem use for nova now at 46% savings
* - The :meth:`.PropComparator.of_type` modifier has beenMike Bayer2014-11-241-3/+6
| | | | | | | | | | | | | | | improved in conjunction with loader directives such as :func:`.joinedload` and :func:`.contains_eager` such that if two :meth:`.PropComparator.of_type` modifiers of the same base type/path are encountered, they will be joined together into a single "polymorphic" entity, rather than replacing the entity of type A with the one of type B. E.g. a joinedload of ``A.b.of_type(BSub1)->BSub1.c`` combined with joinedload of ``A.b.of_type(BSub2)->BSub2.c`` will create a single joinedload of ``A.b.of_type((BSub1, BSub2)) -> BSub1.c, BSub2.c``, without the need for the ``with_polymorphic`` to be explicit in the query. fixes #3256
* - A new implementation for :class:`.KeyedTuple` used by theMike Bayer2014-08-281-15/+55
| | | | | | :class:`.Query` object offers dramatic speed improvements when fetching large numbers of column-oriented rows. fixes #3176
* - mutablemapping adds compiler overhead, so screw itMike Bayer2014-08-151-5/+9
|
* - TIL that dict.keys() in py3K is not an iterator, it is an iterableMike Bayer2014-08-151-41/+5
| | | | | | | | view. So copy collections.OrderedDict and use MutableMapping to set up keys, items, values on our own OrderedDict. Conflicts: lib/sqlalchemy/engine/base.py
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-11/+18
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-2/+2
| | | | Found using: https://github.com/intgr/topy
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - conjunctions like and_() and or_() can now accept generators as arguments.Mike Bayer2014-01-051-0/+7
|
* - add WeakSequence.append()Mike Bayer2013-08-181-3/+10
| | | | - fix and test weakref cleanout for WeakSequence, [ticket:2794]
* Fixed a potential issue in an ordered sequence implementation usedMike Bayer2013-08-181-5/+10
| | | | | | | 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]
* - spot checking of imports, obsolete functionsMike Bayer2013-08-171-1/+0
|
* keep the contract for Properties as returning lists for keys, values, items.Mike Bayer2013-05-291-3/+3
| | | | It's not the same as a dictionary as __iter__ does the values
* - run the whole test suite with the "debugging" ordered dict on,Mike Bayer2013-05-271-8/+19
| | | | find some more failures
* - fix a dict while iterate mutationMike Bayer2013-05-271-0/+11
| | | | | - illustrate how OrderedDict can catch these, but commented out to save function overhead
* clean up some of this collection stuffMike Bayer2013-05-261-16/+27
|
* a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-261-3/+3
| | | | as possible
* baseMike Bayer2013-05-041-3/+3
|
* - the raw 2to3 runMike Bayer2013-04-271-20/+20
| | | | - went through examples/ and cleaned out excess list() calls
* 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]
* - remove all compat items that are pre-2.5 (hooray)Mike Bayer2013-03-091-26/+13
| | | | | | - 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-011-1/+1
|
* - documentation and changelog for [ticket:2601]Mike Bayer2012-12-091-9/+57
|
* 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
* Add items(), values() methods to Properties.Michael Elsdörfer2012-08-291-0/+6
|
* more import cleanupsMike Bayer2012-08-071-2/+1
|
* - justify NamedTuple, now called KeyedTupleMike Bayer2012-07-161-2/+11
| | | | - fix this test
* - [feature] *Very limited* support forMike Bayer2012-07-141-10/+24
| | | | | | | | | | | | | | 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]
* - [moved] The InstrumentationManager interfaceMike Bayer2012-06-241-85/+0
| | | | | | | | | | | | | 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] Changed LRUCache, used by the mapperMike Bayer2012-01-271-4/+9
| | | | | | | | | to cache INSERT/UPDATE/DELETE statements, to use an incrementing counter instead of a timestamp to track entries, for greater reliability versus using time.time(), which can cause test failures on some platforms. [ticket:2379]
* happy new yearMike Bayer2012-01-041-1/+1
|
* - [feature] IdentitySet supports the - operatorMike Bayer2011-12-061-0/+3
| | | | | as the same as difference(), handy when dealing with Session.dirty etc. [ticket:2301]
* rename 'frozendict' to 'immutabledict', since 'frozen' implies hashabilityMike Bayer2011-01-201-5/+5
| | | | | like frozenset which isn't really the purpose of 'immutabledict' (could be someday, in which case, we'd change the name back :) )
* - whitespace removal bonanzaMike Bayer2011-01-021-31/+31
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* - another heap of inlinings and now I really have to be done with thisMike Bayer2010-12-211-7/+14
|