[pypy-commit] pypy py3k: _socket.socket is not weakrefable in CPython, socket.socket() is.
amauryfa
noreply at buildbot.pypy.org
Wed Oct 19 01:43:22 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48219:16e3fa80fbcf
Date: 2011-10-18 22:25 +0200
http://bitbucket.org/pypy/pypy/changeset/16e3fa80fbcf/
Log: _socket.socket is not weakrefable in CPython, socket.socket() is.
("import socket" failed because the latter now inherits from the
former, and the two __weakref__ slots conflicts)
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
@@ -1,6 +1,5 @@
from pypy.interpreter.baseobjspace import Wrappable
-from pypy.interpreter.typedef import TypeDef, make_weakref_descr,\
- interp_attrproperty
+from pypy.interpreter.typedef import TypeDef, interp_attrproperty
from pypy.interpreter.gateway import NoneNotWrapped, interp2app, unwrap_spec
from pypy.rlib.rarithmetic import intmask
from pypy.rlib import rsocket
@@ -18,7 +17,6 @@
class W_RSocket(Wrappable, RSocket):
def __del__(self):
- self.clear_all_weakrefs()
self.close()
def accept_w(self, space):
@@ -524,7 +522,6 @@
[*] not available on all platforms!""",
__new__ = descr_socket_new,
- __weakref__ = make_weakref_descr(W_RSocket),
type = interp_attrproperty('type', W_RSocket),
proto = interp_attrproperty('proto', W_RSocket),
family = interp_attrproperty('family', W_RSocket),
More information about the pypy-commit
mailing list