[pypy-svn] r73308 - pypy/branch/cpython-extension/pypy/module/cpyext

xoraxax at codespeak.net xoraxax at codespeak.net
Fri Apr 2 21:36:48 CEST 2010


Author: xoraxax
Date: Fri Apr  2 21:36:46 2010
New Revision: 73308

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py
Log:
Suppress certain warnings.

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py	Fri Apr  2 21:36:46 2010
@@ -31,6 +31,9 @@
 from pypy.rlib.rstring import rsplit
 
 
+WARN_ABOUT_MISSING_SLOT_FUNCTIONS = False
+
+
 class W_GetSetPropertyEx(GetSetProperty):
     def __init__(self, getset):
         self.getset = getset
@@ -101,7 +104,8 @@
             # XXX special case iternext
             continue
         if slot_func is None:
-            os.write(2, method_name + " defined by the type but no slot function defined!\n")
+            if WARN_ABOUT_MISSING_SLOT_FUNCTIONS:
+                os.write(2, method_name + " defined by the type but no slot function defined!\n")
             continue
         if method_name == "__new__" and "bar" in repr(w_obj):
             import pdb; pdb.set_trace()



More information about the Pypy-commit mailing list