Remove the SSLSocket versions of sendmsg/recvmsg due to lack of proper tests and documentation in conjunction with lack of any known use cases (see issue #6560 for details)

This commit is contained in:
Nick Coghlan 2011-08-23 22:26:44 +10:00
parent 710d27e93a
commit 5fab03fd15
2 changed files with 0 additions and 40 deletions

View file

@ -186,11 +186,8 @@ class BasicSocketTests(unittest.TestCase):
self.assertRaises(socket.error, ss.recv_into, bytearray(b'x'))
self.assertRaises(socket.error, ss.recvfrom, 1)
self.assertRaises(socket.error, ss.recvfrom_into, bytearray(b'x'), 1)
self.assertRaises(socket.error, ss.recvmsg, 1)
self.assertRaises(socket.error, ss.recvmsg_into, [bytearray(b'x')])
self.assertRaises(socket.error, ss.send, b'x')
self.assertRaises(socket.error, ss.sendto, b'x', ('0.0.0.0', 0))
self.assertRaises(socket.error, ss.sendmsg, [b'x'])
def test_timeout(self):
# Issue #8524: when creating an SSL socket, the timeout of the
@ -1523,30 +1520,17 @@ else:
count, addr = s.recvfrom_into(b)
return b[:count]
def _recvmsg(*args, **kwargs):
return s.recvmsg(*args, **kwargs)[0]
def _recvmsg_into(bufsize, *args, **kwargs):
b = bytearray(bufsize)
return bytes(b[:s.recvmsg_into([b], *args, **kwargs)[0]])
def _sendmsg(msg, *args, **kwargs):
return s.sendmsg([msg])
# (name, method, whether to expect success, *args)
send_methods = [
('send', s.send, True, []),
('sendto', s.sendto, False, ["some.address"]),
('sendmsg', _sendmsg, False, []),
('sendall', s.sendall, True, []),
]
recv_methods = [
('recv', s.recv, True, []),
('recvfrom', s.recvfrom, False, ["some.address"]),
('recvmsg', _recvmsg, False, [100]),
('recv_into', _recv_into, True, []),
('recvfrom_into', _recvfrom_into, False, []),
('recvmsg_into', _recvmsg_into, False, [100]),
]
data_prefix = "PREFIX_"