Commits

Philip Jenvey committed e8123a0

try to workaround W_RSocket.__del__ failing
check_graph_of_del_does_not_call_too_much (translation)

Comments (0)

Files changed (1)

pypy/module/_socket/interp_socket.py

         except SocketError, e:
             raise converted_error(space, e)
 
+    def __del__(self):
+        self.clear_all_weakrefs()
+        if self.space:
+            self.enqueue_for_destruction(self.space, W_RSocket.destructor,
+                                         'internal __del__ of ')
+
+    def destructor(self):
+        RSocket.__del__(self)
+
     def _dealloc_warn(self):
         space = self.space
         if not space: