]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
reverted a change which dates back to [changeset:5037] - there
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 30 May 2009 19:38:08 +0000 (19:38 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 30 May 2009 19:38:08 +0000 (19:38 +0000)
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

lib/sqlalchemy/orm/attributes.py

index 1df37b4e1eeb92e0410a1ff19e3885c63c7c9025..f187877c49ea41417fe4c1e02cbd82ab15847174 100644 (file)
@@ -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)