| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
in callcounts specific to the "expiration" of objects, as in
the "auto expire" feature of :meth:`.Session.commit` and
for :meth:`.Session.expire_all`, as well as in the "cleanup" step
which occurs when object states are garbage collected.
fixes #3307
|
|
|
|
| |
- don't do a bool on identity map since it calls __len__
|
| |
|
|
|
|
|
|
| |
now returns lists for ``items()`` and ``values()`` in Py3K.
Early porting to Py3K here had these returning iterators, when
they technically should be "iterable views"..for now, lists are OK.
|
|
|
|
| |
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
|
|
|
|
| |
to get all flake8 passing
|
|
|
|
| |
- fix a bad comparison in MySQL w/ limit/offset thing
|
|
|
|
| |
- restore __len__ to identity map
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
- went through examples/ and cleaned out excess list() calls
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- break out key mechanics of loading objects
into new "orm.loading" module, removing implementation
details from both mapper.py and query.py. is analogous
to persistence.py
- some other cleanup and old cruft removal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ORM, including the MutableType class as well
as the mutable=True flag on PickleType
and postgresql.ARRAY has been removed.
In-place mutations are detected by the ORM
using the sqlalchemy.ext.mutable extension,
introduced in 0.7. The removal of MutableType
and associated constructs removes a great
deal of complexity from SQLAlchemy's internals.
The approach performed poorly as it would incur
a scan of the full contents of the Session
when in use. [ticket:2442]
|
| |
|
|
|
|
|
| |
internally instead of "del" to avoid KeyError/warning
during a non-determinate gc teardown [ticket:2267]
|
|
|
|
|
| |
circumstances could occur with the identity
map, part of [ticket:2148]
|
|
|
|
|
|
|
|
|
|
|
|
| |
rare weakref callbacks during iterations.
The mutex has been removed as it apparently
can cause a reentrant (i.e. in one thread) deadlock,
perhaps when gc collects objects at the point of
iteration in order to gain more memory. It is hoped
that "dictionary changed during iteration" will
be exceedingly rare as iteration methods internally
acquire the full list of objects in a single values()
call. [ticket:2087]
|
| |
|
|
|
|
|
| |
a consistent tag
- AUTHORS file
|
| |
|
|
|
|
|
|
|
|
|
| |
these are back to being part of LoaderStrategy
- simplify attribute.get()
- inline the dict get inside of attribute.__get__()
- revert some memoized attrs from InstanceState which are called in almost
all cases regardless
- inlining
|
|
|
|
| |
- in particular, mapper.primary_key is a tuple now
|
|
|
|
|
|
|
|
| |
remove operations against iteration methods,
which now pre-buffer before returning an
iterable. This because asyncrhonous gc
can remove items via the gc thread at any time.
[ticket:1891]
|
|
|
|
|
|
|
|
|
|
| |
sqlalchemy.orm.strategies, most logging calls during row
loading have been removed. These were never very helpful
and cluttered up the code.
- Some internal streamlining of object loading grants a
small speedup for large results, estimates are around
10-15%.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Weak/StrongIdentityMap.add()
[ticket:1506]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- renamed PASSIVE_NO_CALLABLES to PASSIVE_NO_FETCH
- passive now propagates all the way through lazy callables,
all the way into query._get(), so that many-to-one lazy load
can load the instance via the local session but not trigger
any SQL if not available, fixes [ticket:1298] without
messing up consistency of tests added in r6201
- many-to-one also handles returning PASSIVE_NO_RESULT
for the "old" value thus eliminating the need for the
previous value even if the new value is None
- query._get() uses identity_map.get(), which has been
changed to no longer raise KeyError, thus providing
mythical time savings that didn't seem to make any
difference in how fast the unit tests ran.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
i.e. operations that were scanning the full session,
including an extremely expensive one that was erroneously
assuming primary key values were changing when this
was not the case.
* one edge case remains which may invoke a full scan,
if an existing primary key attribute is modified
to a new value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in conjunction with large mapper graphs, large numbers of
objects:
- The Session's "weak referencing" behavior is now *full* -
no strong references whatsoever are made to a mapped object
or related items/collections in its __dict__. Backrefs and
other cycles in objects no longer affect the Session's ability
to lose all references to unmodified objects. Objects with
pending changes still are maintained strongly until flush.
[ticket:1398]
The implementation also improves performance by moving
the "resurrection" process of garbage collected items
to only be relevant for mappings that map "mutable"
attributes (i.e. PickleType, composite attrs). This removes
overhead from the gc process and simplifies internal
behavior.
If a "mutable" attribute change is the sole change on an object
which is then dereferenced, the mapper will not have access to
other attribute state when the UPDATE is issued. This may present
itself differently to some MapperExtensions.
The change also affects the internal attribute API, but not
the AttributeExtension interface nor any of the publically
documented attribute functions.
- The unit of work no longer genererates a graph of "dependency"
processors for the full graph of mappers during flush(), instead
creating such processors only for those mappers which represent
objects with pending changes. This saves a tremendous number
of method calls in the context of a large interconnected
graph of mappers.
- Cached a wasteful "table sort" operation that previously
occured multiple times per flush, also removing significant
method call count from flush().
- Other redundant behaviors have been simplified in
mapper._save_obj().
|
|
|
|
|
|
|
| |
to the IdentityMap class so that Weak/StrongInstanceDict both
have the same behavior wrt the state referencing the map
- Fixed bug when using weak_instance_map=False where modified
events would not be intercepted for a flush(). [ticket:1272]
|
|
|
|
|
| |
- flattened an unnecessary KeyError in identity.py
- memoized the default list of mapper properties queried in MapperEntity.setup_context
|
|
|
|
|
| |
require mutexing, resurrects garbage collected instance
on a lazy basis for an InstanceState with pending changes.
|
|
|
|
|
|
| |
removal explicitly
- call list() around iteration of _mutable_attrs to guard against async gc.collect() while check_modified() is running
|
| |
|
|
0.4 development continues at /sqlalchemy/branches/rel_0_4
|