[pypy-svn] r42186 - pypy/branch/lib-distributed-rewrite/pypy/lib/distributed

fijal at codespeak.net fijal at codespeak.net
Thu Apr 19 22:38:28 CEST 2007


Author: fijal
Date: Thu Apr 19 22:38:28 2007
New Revision: 42186

Modified:
   pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/faker.py
   pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/objkeeper.py
Log:
Remove debug prints


Modified: pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/faker.py
==============================================================================
--- pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/faker.py	(original)
+++ pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/faker.py	Thu Apr 19 22:38:28 2007
@@ -40,10 +40,6 @@
     """ Wrap type to transpotable entity, taking
     care about descriptors
     """
-    print "Wrapping type %s" % tp.__name__
-    #if tp.__name__ == 'file':
-    #    import pdb
-    #    pdb.set_trace()
     # XXX forget about bases right now
     bases = []
     dict_w = {}
@@ -56,10 +52,8 @@
             if hasattr(value, '__get__') and not type(value) is MethodType:
                 name = type(value).__name__
                 if hasattr(value, '__set__'):
-                    print "GetSet %s" % name
                     dict_w[item] = ('get', name)
                 else:
-                    print "Get %s" % name
                     dict_w[item] = ('set', name)
             else:
                 dict_w[item] = protocol.wrap(value)
@@ -80,7 +74,6 @@
     """ Unwrap remote type, based on it's description
     """
     # XXX sanity check
-    print "Faking type %s" % name_
     assert bases_w == []
     d = dict.fromkeys(dict_w)
     # XXX we do it in two steps to avoid cyclic dependencies,

Modified: pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/objkeeper.py
==============================================================================
--- pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/objkeeper.py	(original)
+++ pypy/branch/lib-distributed-rewrite/pypy/lib/distributed/objkeeper.py	Thu Apr 19 22:38:28 2007
@@ -33,7 +33,6 @@
         try:
             return self.exported_types[tp]
         except KeyError:
-            #print "Registering type %s as %s" % (tp, self.exported_types_id)
             self.exported_types[tp] = self.exported_types_id
             self.exported_types_reverse[self.exported_types_id] = tp
             tp_id = self.exported_types_id
@@ -49,31 +48,7 @@
     def register_remote_type(self, tp, type_id):
         self.remote_types[type_id] = tp
         self.reverse_remote_types[tp] = type_id
-        return
-
-        XXX - stuff
-        #print "Faking type %s as %s" % (_name, type_id)
-        # create and register new type
-        d = dict([(key, None) for key in _dict])
-        # some stuff needs to go first...
-        if '__doc__' in _dict:
-            d['__doc__'] = protocol.unwrap(_dict['__doc__'])
-        tp = type(_name, (object,), d)
-        # Make sure we cannot instantiate the remote type
-        self.remote_types[type_id] = tp
-        self.reverse_remote_types[tp] = type_id
-        for key, value in _dict.items():
-            if key != '__doc__':
-                v = protocol.unwrap(value)
-                if isinstance(v, FunctionType):
-                    setattr(tp, key, staticmethod(v))
-                else:
-                    setattr(tp, key, v)
-            #elif key == '__new__':
-            #    import pdb
-            #    pdb.set_trace()
-            #    tp.new = value
-                    
+    
     def get_type(self, id):
         return self.remote_types[id]
 



More information about the Pypy-commit mailing list