[issue4263] BufferedWriter non-blocking overage

2009-03-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/3/5 Sever Băneșiu : > > Sever Băneșiu added the comment: > > Looks like the test covering the pre-flush condition is missing. That test is no longer applicable because max_buffer_size is deprecated and unused. ___ P

[issue4263] BufferedWriter non-blocking overage

2009-03-05 Thread Sever Băneșiu
Sever Băneșiu added the comment: Looks like the test covering the pre-flush condition is missing. ___ Python tracker ___ ___ Python-bugs-list m

[issue4263] BufferedWriter non-blocking overage

2009-03-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: This has been fixed in io-c branch. (r70152) -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue4263] BufferedWriter non-blocking overage

2009-02-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: This has been cured in the io-c branch. -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Py

[issue4263] BufferedWriter non-blocking overage

2009-01-07 Thread Sever Băneșiu
Sever Băneșiu added the comment: > Anyway :) Practically, the test does work on both py3k and another > implementation, so I don't see any urgency to remove anything from it. Indeed, it doesn't hurt keeping it. For completeness' sake I've updated your tests to cover the pre-flush condition exis

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I feel that no matter what implementation algorithm BufferedWriter uses > it shouldn't write smaller chunks of data than buffer's size or else the > buffer is useless. If you rewrite the above sentence using the word "statistically", then I can agree :) But i

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Sever Băneșiu
Sever Băneșiu added the comment: >> The comment is misleading because in fact no byte is written at raw >> level. That's because the data size is smaller than the buffer size and >> the buffer is empty (was emptied by the last write call). > It depends on the implementation. A different impleme

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The comment is misleading because in fact no byte is written at raw > level. That's because the data size is smaller than the buffer size and > the buffer is empty (was emptied by the last write call). It depends on the implementation. A different implementat

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Sever Băneșiu
Sever Băneșiu added the comment: Thanks for the new implementation of MockNonBlockWriterIO class. It makes tests so much easier to read. There are some minor things in your patch that I would change. For example: # 1 byte will be written, the rest will be buffered raw.block_on(b"k")

[issue4263] BufferedWriter non-blocking overage

2008-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch which replaces testWriteNonBlocking with a reasonable implementation-independent test (it works with e.g. the io-c sandbox). The new test also checks for the current problem, i.e. it passes with the fix to io.py and fails without. Added file: ht

[issue4263] BufferedWriter non-blocking overage

2008-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: The tests should be written so as not to rely on internal implementation details (the _write_buf attribute). -- nosy: +pitrou ___ Python tracker ___

[issue4263] BufferedWriter non-blocking overage

2008-12-07 Thread Sever Băneșiu
Sever Băneșiu <[EMAIL PROTECTED]> added the comment: Christian, if the patch looks good to you I think now it's a good time to commit it. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4263] BufferedWriter non-blocking overage

2008-11-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I do concur with the desire to restrict changes during RC phase. Do this also mean that merges from trunk will be reduced to the strict minimum? No global merge, only on a revision basis after review. In this case we could apply the pat

[issue4263] BufferedWriter non-blocking overage

2008-11-06 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: We have discussed this bug in the python developer chat yesterday. I decided to wait until after the 3.0.0 release. The problem is not critical enough for 3.0.0. I like to keep the amount of changes during the RC phase to a minimum. ---

[issue4263] BufferedWriter non-blocking overage

2008-11-06 Thread Banesiu Sever
Banesiu Sever <[EMAIL PROTECTED]> added the comment: Thanks for your review, here's a new patch. I've added a new test for the pre-flush condition and made the comments less cryptic. Added file: http://bugs.python.org/file11953/bw_overage2.diff ___ Python tra

[issue4263] BufferedWriter non-blocking overage

2008-11-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch is good. I was first surprised by the fact that e.characters_written is not used in the write() method; but _flush_unlocked() already adjusts the _write_buf according to the original e.characters_written raised by the underly

[issue4263] BufferedWriter non-blocking overage

2008-11-05 Thread Banesiu Sever
New submission from Banesiu Sever <[EMAIL PROTECTED]>: In some corner cases io.BufferedWriter raises an io.BlockingIOError "lying" about the number of characters written. I've added some tests and a small change to fix this issue. -- components: Library (Lib) files: bw_overage.diff keywo