From: Mike Bayer Date: Fri, 12 Oct 2012 21:28:25 +0000 (-0400) Subject: - lets default propagate to True here since it was essentially always X-Git-Tag: rel_0_8_0b1~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1394c2ebf449f12506f4ee32810d6d3bbdcea0d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - lets default propagate to True here since it was essentially always propagated previously --- diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py index 174652a15a..a363776817 100644 --- a/lib/sqlalchemy/orm/events.py +++ b/lib/sqlalchemy/orm/events.py @@ -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()