diff --git a/Lib/test/test_inspect/test_inspect.py b/Lib/test/test_inspect/test_inspect.py index 76c346cd89eac04..ff7475447e95a03 100644 --- a/Lib/test/test_inspect/test_inspect.py +++ b/Lib/test/test_inspect/test_inspect.py @@ -6340,7 +6340,7 @@ def test_socket_module_has_signatures(self): # depends on the number of the arguments. methods_no_signature = {'ioctl', 'sendto', 'setsockopt'} # These have parameters with unrepresentable default values. - methods_unsupported_signature = {'listen', 'sendmsg', 'sendmsg_afalg'} + methods_unsupported_signature = {'listen', 'sendmsg_afalg'} defined = vars(socket.SocketType).keys() self._test_module_has_signatures(socket, no_signature, unsupported_signature, diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index 00e5fb4cde3aefd..f89b91b9b997532 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -1018,8 +1018,7 @@ _socket_socket_sendall(PyObject *s, PyObject *const *args, Py_ssize_t nargs) #if defined(CMSG_LEN) PyDoc_STRVAR(_socket_socket_sendmsg__doc__, -"sendmsg($self, buffers, ancdata=, flags=0,\n" -" address=, /)\n" +"sendmsg($self, buffers, ancdata=(), flags=0, address=None, /)\n" "--\n" "\n" "Send normal and ancillary data to the socket.\n" @@ -2479,4 +2478,4 @@ _socket_CMSG_SPACE(PyObject *module, PyObject *arg) #ifndef _SOCKET_CMSG_SPACE_METHODDEF #define _SOCKET_CMSG_SPACE_METHODDEF #endif /* !defined(_SOCKET_CMSG_SPACE_METHODDEF) */ -/*[clinic end generated code: output=133662a8c304b1b7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=acc30d6fdeb54e90 input=a9049054013a1b77]*/ diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 9051420179aea11..70d3738b176cda2 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -4990,9 +4990,9 @@ sock_sendmsg_impl(PySocketSockObject *s, void *data) _socket.socket.sendmsg self as s: self(type="PySocketSockObject *") buffers as data_arg: object - ancdata as cmsg_arg: object = NULL + ancdata as cmsg_arg: object(c_default="NULL") = () flags: int = 0 - address as addr_arg: object = NULL + address as addr_arg: object(c_default="NULL") = None / Send normal and ancillary data to the socket. @@ -5016,7 +5016,7 @@ static PyObject * _socket_socket_sendmsg_impl(PySocketSockObject *s, PyObject *data_arg, PyObject *cmsg_arg, int flags, PyObject *addr_arg) -/*[clinic end generated code: output=3b4cb1110644ce39 input=8ae408971a3aa329]*/ +/*[clinic end generated code: output=3b4cb1110644ce39 input=5fdf9b49bed3848b]*/ { Py_ssize_t i, ndatabufs = 0, ncmsgs, ncmsgbufs = 0;