[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-25 Thread David M. Beazley
New submission from David M. Beazley <[EMAIL PROTECTED]>: The Buffered I/O interface in the io module has the user specify buffer limits such as size and max_buffer_size. The first limit (size) is easy to understand as a buffering threshold at which writes will occur. However, no apparent a

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith
Changes by Gregory P. Smith <[EMAIL PROTECTED]>: -- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> normal ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: I've attached my first attempt at fixing this as io-bufwrite-gps01. Unfortunately it causes the Lib/test/test_io.py testThreads to fail: == FAIL: testThreads (__main__.Buf

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: Yep, the test was ignoring the return value from BufferedWriter.write. Fixed in the attached io-bufwrite-gps02. This can wait for 3.0.1 and 2.6.1/2 (depending on the 2.6.x release schedule). -- keywords: +needs review Added file:

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I do not agree. User code should not have to verify the return value of write(). When a big amount of data is passed to BufferedWriter.write, - normal blocking streams should block until all data has been written. (the implementation ma

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: I agree with Amuary, write() traditionally never writes less data unless the underlying IO is in nonblocking mode. I'm working up a new patch to write to self.raw in max_buffer_size chunks with as few data copies as possible, raising an app

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: Okay, here's a new patch that obeys the blocking vs nonblocking semantics properly. It still needs explicit unit tests for proper behavior. Added file: http://bugs.python.org/file12158/issue4428-io-bufwrite-gps03.diff

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith
Changes by Gregory P. Smith <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file12155/issue4428-io-bufwrite-gps01.diff ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-29 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: According to msg76581, the patch fails review (lacking test cases), so I'm removing the "needs review" keyword. -- keywords: -needs review nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]>

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-29 Thread David M. Beazley
David M. Beazley <[EMAIL PROTECTED]> added the comment: I agree with previous comments that write() should definitely write all data when in blocking mode. ___ Python tracker <[EMAIL PROTECTED]> _

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file12157/issue4428-io-bufwrite-gps02.diff ___ Python tracker ___ ___ Python

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : Added file: http://bugs.python.org/file12806/issue4428-io-bufwrite-gps04.diff ___ Python tracker ___ ___ Python-b

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Updated patch with unit tests to verify the write behavior attached in -gps04. Up for code review at http://codereview.appspot.com/12470/show -- keywords: +needs review ___ Python tracker

[issue4428] io.BufferedWriter does not observe buffer size limits

2009-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file12158/issue4428-io-bufwrite-gps03.diff ___ Python tracker ___ ___ Python