]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- lets default propagate to True here since it was essentially always
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 12 Oct 2012 21:28:25 +0000 (17:28 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 12 Oct 2012 21:28:25 +0000 (17:28 -0400)
propagated previously

lib/sqlalchemy/orm/events.py

index 174652a15a2b2774fcf2b9542492e80322c09fb3..a363776817daeeed5156d54797e95c0d18ff3d49 100644 (file)
@@ -27,6 +27,12 @@ class InstrumentationEvents(event.Events):
     which when used has the effect of events being emitted
     for all classes.
 
+    Note the "propagate" flag here is defaulted to ``True``,
+    unlike the other class level events where it defaults
+    to ``False``.  This means that new subclasses will also
+    be the subject of these events, when a listener
+    is established on a superclass.
+
     .. versionchanged:: 0.8 - events here will emit based
        on comparing the incoming class to the type of class
        passed to :func:`.event.listen`.  Previously, the
@@ -45,7 +51,7 @@ class InstrumentationEvents(event.Events):
             return None
 
     @classmethod
-    def _listen(cls, target, identifier, fn, propagate=False):
+    def _listen(cls, target, identifier, fn, propagate=True):
 
         def listen(target_cls, *arg):
             listen_cls = target()