From: Mike Bayer Date: Sat, 30 May 2009 19:38:08 +0000 (+0000) Subject: reverted a change which dates back to [changeset:5037] - there X-Git-Tag: rel_0_6_6~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f85304bb014b1cbcb3bcb25bad21302f162053a6;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git reverted a change which dates back to [changeset:5037] - there doesn't seem to be any way for an old style class to be in the `__subclasses__()` collection of a new style class. also fixes a 2to3 screwup allowing test/orm/attributes.py to pass fully on py3k --- diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 1df37b4e1e..f187877c49 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -973,9 +973,8 @@ class ClassManager(dict): self.local_attrs[key] = inst self.install_descriptor(key, inst) self[key] = inst + for cls in self.class_.__subclasses__(): - if isinstance(cls, types.ClassType): - continue manager = self._subclass_manager(cls) manager.instrument_attribute(key, inst, True) @@ -995,8 +994,6 @@ class ClassManager(dict): if key in self.mutable_attributes: self.mutable_attributes.remove(key) for cls in self.class_.__subclasses__(): - if isinstance(cls, types.ClassType): - continue manager = self._subclass_manager(cls) manager.uninstrument_attribute(key, True)