Title: socket.sendall no longer sends all
Type: behaviour Severity: critical
Components: Core Versions: Jython 2.7
Milestone: Jython 2.7.3
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: amak, behackett, kasemir
Priority: Keywords:

Created on 2017-08-25.02:59:17 by behackett, last changed 2020-03-02.08:13:43 by jeff.allen.

File name Uploaded Description Edit Remove behackett, 2017-08-25.02:59:17
msg11546 (view) Author: Bernie Hackett (behackett) Date: 2017-08-25.02:59:17
This is a regression from Jython 2.7.0. socket.sendall is just an alias for socket.send. In 2.7.0 this doesn't appear to cause any problems as sendall seems to consistently send all the bytes given to it. This is no longer the case in 2.7.1. The regression seems to be caused by the changes for

This is a serious regression that will break any library using socket.sendall. socket.sendall in CPython only returns None or raises if there is an error. It blocks until all data is sent.

Repro script attached.
msg12144 (view) Author: Kay Kasemir (kasemir) Date: 2018-10-19.17:13:50 is affected by this regression.
Data sent with an HTTP 'POST' request is truncated because send == sendall only sends partial data.
Date User Action Args
2020-03-02 08:13:43jeff.allensetmilestone: Jython 2.7.3
2018-10-19 17:13:51kasemirsetmessages: + msg12144
2018-10-19 17:09:24kasemirsetnosy: + kasemir
2017-08-25 16:37:33amaksetnosy: + amak
2017-08-25 02:59:39behackettsettype: behaviour
2017-08-25 02:59:18behackettcreate