summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event
Commit message (Collapse)AuthorAgeFilesLines
* - Added a new keyword argument ``once=True`` to :func:`.event.listen`Mike Bayer2014-03-112-2/+31
| | | | | and :func:`.event.listens_for`. This is a convenience feature which will wrap the given listener such that it is only invoked once.
* - get util.get_callable_argspec() to be completely bulletproof for 2.6-3.4,Mike Bayer2014-03-021-1/+1
| | | | | methods, classes, builtins, functools.partial(), everything known so far - use get_callable_argspec() within ColumnDefault._maybe_wrap_callable, re: #2979
* - Fixed bug where events set to listen at the classMike Bayer2014-02-251-1/+1
| | | | | | | | level (e.g. on the :class:`.Mapper` or :class:`.ClassManager` level, as opposed to on an individual mapped class, and also on :class:`.Connection`) that also made use of internal argument conversion (which is most within those categories) would fail to be removable. fixes #2973
* restore the check ahead of the lock to avoid using it after initializationMike Bayer2014-02-191-6/+7
| | | | is done
* - Fixed a critical regression caused by :ticket:`2880` where the newlyMike Bayer2014-02-191-4/+13
| | | | | | concurrent ability to return connections from the pool means that the "first_connect" event is now no longer synchronized either, thus leading to dialect mis-configurations under even minimal concurrency situations.
* - bump up how many args for "named arg style" to fourMike Bayer2014-01-121-1/+1
|
* - happy new yearMike Bayer2014-01-056-6/+6
|
* - Fixed regression where using a ``functools.partial()`` with the eventMike Bayer2014-01-041-2/+7
| | | | | | | | | | | system would cause a recursion overflow due to usage of inspect.getargspec() on it in order to detect a legacy calling signature for certain events, and apparently there's no way to do this with a partial object. Instead we skip the legacy check and assume the modern style; the check itself now only occurs for the SessionEvents.after_bulk_update and SessionEvents.after_bulk_delete events. Those two events will require the new signature style if assigned to a "partial" event listener. [ticket:2905]
* - add copyright to source files missing itMike Bayer2013-10-266-1/+31
|
* - add support for removal of instance methods as event listeners, takingMike Bayer2013-10-011-2/+6
| | | | into account the id() of the function itself and self, [ticket:2832]
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-143-21/+44
| | | | | | | | | - 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
* fix missing commaMike Bayer2013-07-311-1/+1
|
* - this collection can be None on cleanup, so check for thatMike Bayer2013-07-271-1/+1
|
* - add event.contains() function to the event package, returns TrueMike Bayer2013-07-263-17/+23
| | | | | if the given target/event/fn is set up to listen. - repair mutable package which is doing some conditional event listening
* - Removal of event listeners is now implemented. The feature isMike Bayer2013-07-266-0/+1034
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.