[pypy-commit] pypy py3k: try to workaround W_RSocket.__del__ failing
pjenvey
noreply at buildbot.pypy.org
Wed Feb 20 20:36:50 CET 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r61499:e8123a0eeb5b
Date: 2013-02-20 11:33 -0800
http://bitbucket.org/pypy/pypy/changeset/e8123a0eeb5b/
Log: try to workaround W_RSocket.__del__ failing
check_graph_of_del_does_not_call_too_much (translation)
diff --git a/pypy/module/_socket/interp_socket.py b/pypy/module/_socket/interp_socket.py
--- a/pypy/module/_socket/interp_socket.py
+++ b/pypy/module/_socket/interp_socket.py
@@ -158,6 +158,15 @@
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:
More information about the pypy-commit
mailing list