summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/instrumentation.py
Commit message (Collapse)AuthorAgeFilesLines
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - spot checking of imports, obsolete functionsMike Bayer2013-08-171-1/+1
|
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-141-25/+52
| | | | | | | | | - rework the event system so that event modules load after their targets, dependencies are reversed - create an improved strategy lookup system for the ORM - rework the ORM to have very few import cycles - move out "importlater" to just util.dependency - other tricks to cross-populate modules in as clear a way as possible
* - Removal of event listeners is now implemented. The feature isMike Bayer2013-07-261-0/+6
| | | | | | | | | | | | | | | | provided via the :func:`.event.remove` function. [ticket:2268] - reorganization of event.py module into a package; with the addition of the docstring work as well as the new registry for removal, there's a lot more code now. the package separates concerns and provides a top-level doc for each subsection of functionality - the remove feature works by providing the EventKey object which associates the user-provided arguments to listen() with a global, weak-referencing registry. This registry stores a collection of _ListenerCollection and _DispatchDescriptor objects associated with each set of arguments, as well as the wrapped function which was applied to that collection. The EventKey can then be recreated for a removal, all the _ListenerCollection and _DispatchDescriptor objects are located, and the correct wrapped function is removed from each one.
* remove all remaining start/end py2k/py3k blocksMike Bayer2013-06-071-11/+9
|
* most of ORM passing...Mike Bayer2013-05-041-0/+2
|
* - the raw 2to3 runMike Bayer2013-04-271-14/+16
| | | | - went through examples/ and cleaned out excess list() calls
* Improved the behavior of instance management regardingMike Bayer2013-04-201-0/+7
| | | | | | | | | | | | | | the creation of strong references within the Session; an object will no longer have an internal reference cycle created if it's in the transient state or moves into the detached state - the strong ref is created only when the object is attached to a Session and is removed when the object is detached. This makes it somewhat safer for an object to have a `__del__()` method, even though this is not recommended, as relationships with backrefs produce cycles too. A warning has been added when a class with a `__del__()` method is mapped. [ticket:2708]
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* Extended the :doc:`/core/inspection` system so that all Python descriptorsMike Bayer2012-12-291-1/+19
| | | | | | | | associated with the ORM or its extensions can be retrieved. This fulfills the common request of being able to inspect all :class:`.QueryableAttribute` descriptors in addition to extension types such as :class:`.hybrid_property` and :class:`.AssociationProxy`. See :attr:`.Mapper.all_orm_descriptors`.
* just a pep8 pass of lib/sqlalchemy/orm/Diana Clarke2012-11-191-2/+5
|
* - [feature] Improvements to event listening forMike Bayer2012-10-121-0/+6
| | | | | | | | | | | | | | | | | | | mapped classes allows that unmapped classes can be specified for instance- and mapper-events. The established events will be automatically set up on subclasses of that class when the propagate=True flag is passed, and the events will be set up for that class itself if and when it is ultimately mapped. [ticket:2585] - [bug] The instrumentation events class_instrument(), class_uninstrument(), and attribute_instrument() will now fire off only for descendant classes of the class assigned to listen(). Previously, an event listener would be assigned to listen for all classes in all cases regardless of the "target" argument passed. [ticket:2590]
* - with InstanceState more public, underscore all its methodsMike Bayer2012-07-181-7/+7
| | | | | that change object state as these aren't intended for public use.
* - [moved] The InstrumentationManager interfaceMike Bayer2012-06-241-316/+79
| | | | | | | | | | | | | 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.
* - move all of orm to use absolute importsMike Bayer2012-06-231-4/+3
| | | | | | | | - 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
* - [removed] The legacy "mutable" system of theMike Bayer2012-04-231-7/+1
| | | | | | | | | | | | | | 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]
* begin implementing inspection system for #2208Mike Bayer2012-04-031-1/+1
|
* happy new yearMike Bayer2012-01-041-1/+1
|
* - Enhanced the instrumentation in the ORM to supportMike Bayer2011-09-281-0/+4
| | | | | | | | Py3K's new argument style of "required kw arguments", i.e. fn(a, b, *, c, d), fn(a, b, *args, c, d). Argument signatures of mapped object's __init__ method will be preserved, including required kw rules. [ticket:2237]
* take out a little cruft. Spend two hours trying to make things simpler,Mike Bayer2011-06-011-23/+1
| | | | | maybe we dont need state.callables (nope we do), maybe we can move populate_state out (nope we lose speed that way), things are the way they are...
* - add a comment regarding why __init__ has a return valueMike Bayer2011-05-281-1/+2
|
* - whitespace removal bonanzaMike Bayer2011-01-021-51/+51
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* - removes the "on_" prefix.Mike Bayer2010-12-301-4/+4
|
* - another heap of inlinings and now I really have to be done with thisMike Bayer2010-12-211-7/+9
|
* - propagate flag on event.listen() results in the listener being placedMike Bayer2010-11-071-6/+19
| | | | | | | | | | | in a separate collection. this collection also propagates during update() - ClassManager now handles bases, subclasses collections. - ClassManager looks at __bases__ instead of __mro__ for superclasses. It's assumed ClassManagers are in an unbroken chain upwards through __mro__. - trying to get a clear() that makes sense on cls.dispatch - implemented propagate for attribute events, plus permutation-based test - implemented propagate for mapper / instance events with rudimentary test - some pool events tests are failing for some reason
* a little cleanup, but we probably need a generalized "propagate" mechanismMike Bayer2010-11-061-2/+3
|
* - begin adding tests for event registration and dispatch standaloneMike Bayer2010-10-021-1/+1
| | | | | - fix pickling again - other test fixes
* - add instrumentation eventsMike Bayer2010-10-021-2/+10
| | | | | | | | | - simplify listen_for_events example with new system - add "propagate", "retval", "raw" flags to attribute events. this solves the "return value" issue as well as the "subclass" issue. - begin thinking about event removal. Each listen() method will have a corresponding remove(). Custom listen() methods will have to package all the info onto the event function that is needed to remove its state.
* - reorganizationMike Bayer2010-09-141-0/+661
- 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