From 30bd28fca2091e4b2b093154a14c668c09ae3ccd Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 20 Oct 2016 10:24:40 -0400 Subject: Ensure TypeDecorator delegates _set_parent_with_dispatch Ensure TypeDecorator delegates _set_parent_with_dispatch as well as _set_parent to itself as well as its impl, as the TypeDecorator class itself may have an active SchemaType implementation as well. Fixed regression which occurred as a side effect of :ticket:`2919`, which in the less typical case of a user-defined :class:`.TypeDecorator` that was also itself an instance of :class:`.SchemaType` (rather than the implementation being such) would cause the column attachment events to be skipped for the type itself. Change-Id: I0afb498fd91ab7d948e4439e7323a89eafcce0bc Fixes: #3832 --- lib/sqlalchemy/sql/base.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/sqlalchemy/sql/base.py') diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index cf7dcfd31..0b036847b 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -426,8 +426,6 @@ class SchemaEventTarget(object): def _set_parent(self, parent): """Associate with this SchemaEvent's parent object.""" - raise NotImplementedError() - def _set_parent_with_dispatch(self, parent): self.dispatch.before_parent_attach(self, parent) self._set_parent(parent) -- cgit v1.2.1