Author: Manuel Jacob <[email protected]>
Branch: py3k
Changeset: r82582:4c5a11012b5e
Date: 2016-02-27 01:35 +0100
http://bitbucket.org/pypy/pypy/changeset/4c5a11012b5e/
Log: Port remaining changes from eea8f92e03 to py3k.
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
@@ -166,6 +166,7 @@
def descr_new(space, w_subtype, __args__):
sock = space.allocate_instance(W_Socket, w_subtype)
+ W_Socket.__init__(sock, space, RSocket.empty_rsocket())
return space.wrap(sock)
@unwrap_spec(family=int, type=int, proto=int,
diff --git a/pypy/module/_socket/test/test_sock_app.py
b/pypy/module/_socket/test/test_sock_app.py
--- a/pypy/module/_socket/test/test_sock_app.py
+++ b/pypy/module/_socket/test/test_sock_app.py
@@ -623,7 +623,7 @@
assert Socket_IPV6().family == socket.AF_INET6
def test_subclass_noinit(self):
- from _socket import socket
+ from _socket import socket, error
class MySock(socket):
def __init__(self, *args):
pass # don't call super
@@ -632,7 +632,7 @@
assert s.proto == 0
assert s.family == 0
assert s.fileno() < 0
- raises(OSError, s.bind, ('localhost', 0))
+ raises(error, s.bind, ('localhost', 0))
def test_dealloc_warn(self):
import _socket
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit