summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event/attr.py
Commit message (Collapse)AuthorAgeFilesLines
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - Fixed an issue where a particular base class within utilsMike Bayer2015-07-201-7/+7
| | | | | | | | | didn't implement ``__slots__``, and therefore meant all subclasses of that class didn't either, negating the rationale for ``__slots__`` to be in use. Didn't cause any issue except on IronPython which apparently does not implement ``__slots__`` behavior compatibly with cPython. Fixes #3494
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - add MemoizedSlots, a generalized solution to using __getattr__Mike Bayer2015-01-051-12/+13
| | | | | for memoization on a class that uses slots. - apply many more __slots__. mem use for nova now at 46% savings
* - wip - start factoring events so that we aren't using descriptors for dispatch,Mike Bayer2015-01-041-47/+28
| | | | allowing us to move to __slots__
* - start trying to move things into __slots__. This seems to reduce theslotsMike Bayer2015-01-041-0/+4
| | | | | size of the many per-column objects we're hitting, but somehow the overall memory is hardly being reduced at all in initial testing
* - Fixed bug that affected many classes of event, particularlyMike Bayer2014-09-181-4/+2
| | | | | | | | | | | ORM events but also engine events, where the usual logic of "de duplicating" a redundant call to :func:`.event.listen` with the same arguments would fail, for those events where the listener function is wrapped. An assertion would be hit within registry.py. This assertion has now been integrated into the deduplication check, with the added bonus of a simpler means of checking deduplication across the board. fixes #3199
* - Removing (or adding) an event listener at the same time that the eventMike Bayer2014-08-141-7/+8
| | | | | | | | | is being run itself, either from inside the listener or from a concurrent thread, now raises a RuntimeError, as the collection used is now an instance of ``colletions.deque()`` and does not support changes while being iterated. Previously, a plain Python list was used where removal from inside the event itself would produce silent failures. fixes #3163
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-19/+20
| | | | 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
* - 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.
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - 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-261-0/+6
|
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-141-17/+0
| | | | | | | | | - 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/+382
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.