cpython: cdc83da0b0f8 (original) (raw)

--- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1156,6 +1156,10 @@ to sockets. much data, if any, was successfully sent. .. versionchanged:: 3.5

+

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -19,6 +19,10 @@ Core and Builtins Library ------- +- Issue #23853: :meth:socket.socket.sendall does no more reset the socket

--- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -706,9 +706,10 @@ sock_call_ex(PySocketSockObject *s, int (*sock_func) (PySocketSockObject *s, void *data), void *data, int connect,

{

if (interval >= 0) @@ -832,7 +833,7 @@ sock_call(PySocketSockObject *s, int (*func) (PySocketSockObject *s, void *data), void *data) {

} @@ -2636,12 +2637,14 @@ internal_connect(PySocketSockObject s, if (raise) { / socket.connect() raises an exception on error */

if (!PyArg_ParseTuple(args, "y*|i:sendall", &pbuf, &flags)) return NULL; @@ -3562,13 +3570,27 @@ sock_sendall(PySocketSockObject *s, PyOb } do {

+

+ ctx.buf = buf; ctx.len = len; ctx.flags = flags;

@@ -3578,14 +3600,17 @@ sock_sendall(PySocketSockObject s, PyOb / We must run our signal handlers before looping again. send() can return a successful partial write when it is interrupted, so we can't restrict ourselves to EINTR. */

+ +done:

} PyDoc_STRVAR(sendall_doc,