[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-06-29 Thread Martin Panter
Martin Panter added the comment: Committed for 3.6. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ea79767ff75 by Martin Panter in branch 'default': Issue #26721: Change StreamRequestHandler.wfile to BufferedIOBase https://hg.python.org/cpython/rev/4ea79767ff75 -- nosy: +python-dev ___ Python tracker

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Forgot to remove the workaround added to 3.5 for wsgiref in Issue 24291 -- Added file: http://bugs.python.org/file43366/buffered-wfile.v4.patch ___ Python tracker __

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-06-12 Thread Martin Panter
Martin Panter added the comment: Merged with current code, and migrated the interrupted-write test from test_wsgiref into test_socketserver. -- Added file: http://bugs.python.org/file43365/buffered-wfile.v3.patch ___ Python tracker

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-05-14 Thread Martin Panter
Martin Panter added the comment: Merged with current code, and copied the original wsgiref test case from Issue 24291, since this patch also fixes that bug. -- Added file: http://bugs.python.org/file42843/buffered-wfile.v2.patch ___ Python tracker <

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-22 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-14 Thread Martin Panter
Martin Panter added the comment: If a user calls makefile(bufsize=0), they may have written that based on Python 2’s behaviour of always doing full writes. But in Python 3 this is indirectly documented as doing partial writes: makefile() args interpreted as for open, and open() buffering disab

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-14 Thread STINNER Victor
STINNER Victor added the comment: > I recall a "write1" function which was well defined: limited to 1 syscall, > don't try (or maybe only on the very specific case of EINTR). But I'm not > sure that it still exists in the io module of Python 3. Oops, in fact it is read1: https://docs.python.or

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-14 Thread STINNER Victor
STINNER Victor added the comment: FYI I recently worked on a issue with partial write in eventlet on Python 3: * https://github.com/eventlet/eventlet/issues/274 * https://github.com/eventlet/eventlet/issues/295 By the way, I opened #26292 "Raw I/O writelines() broken for non-blocking I/O" as a

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-14 Thread STINNER Victor
STINNER Victor added the comment: Hum, since long time ago, Python has issues with partial write. It's hard to guess if a write will always write all data, store the data on partial write, or simply ignore remaining data on partial write. I recall a "write1" function which was well defined: li

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-09 Thread Martin Panter
Martin Panter added the comment: Here is a patch with my proposal. -- keywords: +patch Added file: http://bugs.python.org/file42417/buffered-wfile.patch ___ Python tracker ___ __

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-09 Thread Martin Panter
New submission from Martin Panter: This is a follow-on from Issue 24291. Currently, for stream servers (as opposed to datagram servers), the wfile attribute is a raw SocketIO object. This means that wfile.write() is a simple wrapper around socket.send(), and can do partial writes. There is a