[pypy-svn] r34425 - pypy/dist/pypy/annotation

pedronis at codespeak.net pedronis at codespeak.net
Thu Nov 9 17:41:16 CET 2006


Author: pedronis
Date: Thu Nov  9 17:41:14 2006
New Revision: 34425

Modified:
   pypy/dist/pypy/annotation/classdef.py
Log:
ignore bound methods for the warning.



Modified: pypy/dist/pypy/annotation/classdef.py
==============================================================================
--- pypy/dist/pypy/annotation/classdef.py	(original)
+++ pypy/dist/pypy/annotation/classdef.py	Thu Nov  9 17:41:14 2006
@@ -115,8 +115,11 @@
             if not s_newvalue.isNone() and s_newvalue.getKind() == description.MethodDesc:
                 if homedef.classdesc.read_attribute(attr, None) is None: # is method
                     if not homedef.check_missing_attribute_update(attr):
-                        self.bookkeeper.warning("demoting method %s to base class %s" % 
-                                                (self.name, homedef))
+                        for desc in s_newvalue.descriptions:
+                            if desc.selfclassdef is None:
+                                self.bookkeeper.warning("demoting method %s to base class %s" % 
+                                                        (self.name, homedef))
+                                break
 
         # check for attributes forbidden by slots
         if homedef.classdesc.allslots is not None:



More information about the Pypy-commit mailing list