From c1394c2ebf449f12506f4ee32810d6d3bbdcea0d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 Oct 2012 17:28:25 -0400 Subject: [PATCH] - lets default propagate to True here since it was essentially always propagated previously --- lib/sqlalchemy/orm/events.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() -- 2.47.3