diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-04 15:07:36 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-04 18:06:02 -0500 |
| commit | cf272325635c1205da7fd2668eac3c8ac409dafb (patch) | |
| tree | 7a34220d9c63d54bf2b072786062851fd9a137c3 /lib/sqlalchemy/event/registry.py | |
| parent | 315db703a63f5fe5fecf6417f78ff513ff091966 (diff) | |
| download | sqlalchemy-cf272325635c1205da7fd2668eac3c8ac409dafb.tar.gz | |
- wip - start factoring events so that we aren't using descriptors for dispatch,
allowing us to move to __slots__
Diffstat (limited to 'lib/sqlalchemy/event/registry.py')
| -rw-r--r-- | lib/sqlalchemy/event/registry.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/event/registry.py b/lib/sqlalchemy/event/registry.py index fc26f91d7..ebc0e6d18 100644 --- a/lib/sqlalchemy/event/registry.py +++ b/lib/sqlalchemy/event/registry.py @@ -37,7 +37,7 @@ listener collections and the listener fn contained _collection_to_key = collections.defaultdict(dict) """ -Given a _ListenerCollection or _DispatchDescriptor, can locate +Given a _ListenerCollection or _ClsLevelListener, can locate all the original listen() arguments and the listener fn contained ref(listenercollection) -> { @@ -191,9 +191,9 @@ class _EventKey(object): target, identifier, fn = \ self.dispatch_target, self.identifier, self._listen_fn - dispatch_descriptor = getattr(target.dispatch, identifier) + dispatch_collection = getattr(target.dispatch, identifier) - adjusted_fn = dispatch_descriptor._adjust_fn_spec(fn, named) + adjusted_fn = dispatch_collection._adjust_fn_spec(fn, named) self = self.with_wrapper(adjusted_fn) @@ -230,13 +230,13 @@ class _EventKey(object): target, identifier, fn = \ self.dispatch_target, self.identifier, self._listen_fn - dispatch_descriptor = getattr(target.dispatch, identifier) + dispatch_collection = getattr(target.dispatch, identifier) if insert: - dispatch_descriptor.\ + dispatch_collection.\ for_modify(target.dispatch).insert(self, propagate) else: - dispatch_descriptor.\ + dispatch_collection.\ for_modify(target.dispatch).append(self, propagate) @property |
