[issue1103213] Adding the missing socket.recvall() method

2015-04-03 Thread STINNER Victor
STINNER Victor added the comment: - I've learned that MSG_WAITALL may be unreliable on certain systems, so any implementation of recvall depending on MSG_WAITALL may inexplicably fail on such systems Something else occurred since 5 years: the PEP 475 was accepted, it makes Python more

[issue1103213] Adding the missing socket.recvall() method

2015-01-19 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone jean-p...@hybridcluster.com: -- nosy: -exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___

[issue1103213] Adding the missing socket.recvall() method

2015-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm frankly not sure why this is useful. If you want a guaranteed read size you should use the buffered layer - i.e. socket.makefile(). No need to complicate the raw socket implementation. -- nosy: +pitrou ___

[issue1103213] Adding the missing socket.recvall() method

2015-01-16 Thread STINNER Victor
STINNER Victor added the comment: The patch uses the flag MSG_WAITALL for recv() if available. Extract of the manual page: MSG_WAITALL (since Linux 2.2) This flag requests that the operation block until the full request is satisfied. However, the

[issue1103213] Adding the missing socket.recvall() method

2015-01-16 Thread Irmen de Jong
Irmen de Jong added the comment: I created the patch about 5 years ago and in the meantime a few things have happened: - I've not touched C for a very long time now - I've learned that MSG_WAITALL may be unreliable on certain systems, so any implementation of recvall depending on MSG_WAITALL

[issue1103213] Adding the missing socket.recvall() method

2015-01-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___ Python-bugs-list

[issue1103213] Adding the missing socket.recvall() method

2014-12-31 Thread A.M. Kuchling
Changes by A.M. Kuchling a...@amk.ca: -- nosy: -akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___ Python-bugs-list mailing

[issue1103213] Adding the missing socket.recvall() method

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___

[issue1103213] Adding the missing socket.recvall() method

2010-08-19 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: @Irmen if you do proceed with this it should be against the py3k trunk. -- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Irmen de Jong
Irmen de Jong ir...@razorvine.net added the comment: Ok I think I've got the code and doc changes ready. I added a recvall and a recvall_into method to the socket module. Any partially received data in case of errors is returned to the application as part of the args for a new exception,

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Irmen de Jong
Changes by Irmen de Jong ir...@razorvine.net: Removed file: http://bugs.python.org/file6439/patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Irmen de Jong
Changes by Irmen de Jong ir...@razorvine.net: Added file: http://bugs.python.org/file16762/socketmodulepatch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Irmen de Jong
Changes by Irmen de Jong ir...@razorvine.net: Added file: http://bugs.python.org/file16763/libpatch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Irmen de Jong
Changes by Irmen de Jong ir...@razorvine.net: Added file: http://bugs.python.org/file16764/docpatch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Just a couple comments: * If MSG_WAITALL is defined and a signal interrupts recv, will a string shorter than requested will be returned by sock_recvall? * Since MSG_WAITALL is already exposed to Python (when the underlying platform

[issue1103213] Adding the missing socket.recvall() method

2010-04-05 Thread Irmen de Jong
Irmen de Jong ir...@razorvine.net added the comment: Currently if MSG_WAITALL is defined, recvall() just calls recv() internally with the extra flag. Maybe that isn't the smartest thing to do because it duplicates recv's behavior on errors. Which is: release the data and raise an error. Would

[issue1103213] Adding the missing socket.recvall() method

2010-03-16 Thread Irmen de Jong
Irmen de Jong ir...@users.sourceforge.net added the comment: Sure, I'll give it another go. I've not done any c-development for quite a while though, so I have to pick up the pieces and see how far I can get. Also, I don't have any compiler for Windows so maybe I'll need someone else to

[issue1103213] Adding the missing socket.recvall() method

2010-03-16 Thread Irmen de Jong
Irmen de Jong ir...@razorvine.net added the comment: Ok I've looked at it again and think I can build an acceptable patch this time. However there are 2 things that I'm not sure of: 1) how to return the partial data to the application if the recv() loop fails before completion. Because the

[issue1103213] Adding the missing socket.recvall() method

2009-02-14 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- stage: - test needed type: - feature request versions: +Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___