| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
See README.unittests for information on how to run
the tests. [ticket:970]
|
|
|
|
| |
dependencies on those.
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
the same way Session.execute() does and accepts same
alternative **kw args.
|
|
|
|
|
|
| |
Session methods have been deprecated, replaced by
"expunge_all()" and "add()". "expunge_all()" has also
been added to ScopedSession.
|
| |
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
connection session tests to pass.
|
|
|
|
|
| |
This should assist with helping to document the reasons for testing failures.
Currently unspecified failures are defaulted to 'FIXME: unknown'.
|
|
|
|
| |
failing savepoint related tests.
|
|
|
|
| |
these.
|
|
|
|
|
|
| |
* after_bulk_delete
* after_bulk_update
|
|
|
|
|
| |
the deferred lambda: created by lazy_clause would get a state with
no dict. creates strong reference to the object now.
|
|
|
|
|
| |
require mutexing, resurrects garbage collected instance
on a lazy basis for an InstanceState with pending changes.
|
|
|
|
|
|
| |
starting a new transaction.
Moved starting a new transaction in case of previous closing into SessionTransaction.
|
|
|
|
|
|
|
|
|
|
|
| |
it (regression from 0.4).
- Removed the "raiseerror" keyword argument from object_mapper()
and class_mapper(). These functions raise in all cases
if the given class/instance is not mapped.
- Refined ExtensionCarrier to be itself a dict, removed
'methods' accessor
- moved identity_key tests to test/orm/utils.py
- some docstrings
|
|
|
|
|
| |
cascades fire off [ticket:5058]
- after_attach() only fires if the object was not previously attached
|
| |
|
|
|
|
|
| |
not already present. This was a regression bug from 0.4
[ticket:1150]
|
|
|
|
|
|
|
|
|
|
|
| |
before the list of new/dirty/deleted is calculated for the
final time, allowing routines within before_flush() to
further change the state of the Session before the flush
proceeds. [ticket:1128]
- Reentrant calls to flush() raise an error. This also
serves as a rudimentary, but not foolproof, check against
concurrent calls to Session.flush().
|
|
|
|
|
| |
- renamed SessionTransaction autoflush to reentrant_flush to more clearly state its purpose
- added _enable_transaction_accounting, flag for Mike Bernson which disables the whole 0.5 transaction state management; the system depends on expiry on rollback in order to function.
|
|
|
|
|
| |
has been removed. For rationale, see
http://groups.google.com/group/sqlalchemy/browse_thread/thread/9e23a0641a88b96d?hl=en
|
|
|
|
|
|
|
| |
Session whereby asynchronous GC could remove unmodified,
no longer referenced items from the session as they were
present in a list of items to be processed, typically
during session.expunge_all() and dependent methods.
|
|
|
|
| |
(sets.Set-based collections & DB-API returns still work.)
|
|
|
|
|
| |
This is called at the point of attachment for objects
via add(), add_all(), delete(), and merge().
|
|
|
|
|
|
| |
a transaction is in progress [ticket:976]. This
flag is always True with a "transactional"
(in 0.5 a non-"autocommit") Session.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in DELETE; not sure how to do this exact operation in MySQL
- added query_cls keyword argument to sessionmaker(); allows user-defined Query subclasses to be generated by query().
- added @attributes.on_reconstitute decorator, MapperExtension.on_reconstitute, both receieve 'on_load' attribute event allowing
non-__init__ dependent instance initialization routines.
- push memusage to the top to avoid pointless heisenbugs
- renamed '_foostate'/'_fooclass_manager' to '_sa_instance_state'/'_sa_class_manager'
- removed legacy instance ORM state accessors
- query._get() will use _remove_newly_deleted instead of expunge() on ObjectDeleted, so that transaction rollback
restores the previous state
- removed MapperExtension.get(); replaced by a user-defined Query subclass
- removed needless **kwargs from query.get()
- removed Session.get(cls, id); this is redundant against Session.query(cls).get(id)
- removed Query.load() and Session.load(); the use case for this method has never been clear, and the same functionality is available in more explicit ways
|
|
|
|
| |
- restored the chunk of test r4806 deleted (!)
|
|
|
|
|
|
| |
- removed 'instance' arg from session.get_bind() and friends, this is not a public API
- renamed 'state' arg on same to '_state'
- fixes [ticket:1055]
|
|
|
|
|
|
|
| |
- Guards are now present on all public Session methods and passing in an
unmapped hoho anywhere yields helpful exception messages, going to some
effort to provide hints for debugging situations that would otherwise seem
hopeless, such as broken user instrumentation or half-pickles.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- @unsupported now only accepts a single target and demands a reason
for not running the test.
- @exclude also demands an exclusion reason
- Greatly expanded @testing.requires.<feature>, eliminating many
decorators in the suite and signficantly easing integration of
multi-driver support.
- New ORM test base class, and a featureful base for mapped tests
- Usage of 'global' for shared setup going away, * imports as well
|
|
|
|
| |
0.4 development continues at /sqlalchemy/branches/rel_0_4
|
|
|
|
| |
- Session.rollback() will rollback on a prepared session
|
|
|
|
| |
[ticket:869]
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
case it's evaluated at statement execution time to
get the value.
- expressions used in filter(), filter_by() and others,
when they make usage of a clause generated from a
relation using the identity of a child object
(e.g. filter(Parent.child==<somechild>)), evaluate
the actual primary key value of <somechild> at
execution time so that the autoflush step of the
Query can complete, thereby populating the PK value
of <somechild> in the case that <somechild> was
pending.
- cleanup of attributes.get_committed_value() to never return
the NO_VALUE value; evaluates to None
|
|
|
|
|
| |
tests extend from either TestBase or ORMTest, using additional mixins for
special assertion methods as needed
|
|
|
|
|
|
|
| |
by a scoped_session. This provides MyClass.query
without using Session.mapper. Use via:
MyClass.query = Session.query_property()
|
|
|
|
|
|
|
|
|
|
|
| |
connection to a nested session transaction.
- session.transaction now always refers to the innermost active transaction, even when commit/rollback are called directly on the session transaction object.
- when preparing a two-phase transaction fails on one connection all the connections are rolled back.
- two phase transactions can now be prepared.
- session.close() didn't close all transactions when nested transactions were used.
- rollback() previously erroneously set the current transaction directly to the parent of the transaction that could be rolled back to.
- autoflush for commit() wasn't flushing for simple subtransactions.
|
|
|
|
|
|
| |
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase
- testing.db has the configured db
- Fixed up the perf/* scripts
|
|
|
|
| |
No surprises.
|