[issue18876] Problems with files opened in append mode with io module

2020-08-04 Thread Erik Bray
Erik Bray added the comment: Indeed, this can be closed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue18876] Problems with files opened in append mode with io module

2018-01-31 Thread Cheryl Sabella
Cheryl Sabella added the comment: I believe Erik opened #20082 for the BufferedWriter bug, so I think this issue can be closed as Resolved? -- nosy: +csabella ___ Python tracker _

[issue18876] Problems with files opened in append mode with io module

2013-09-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Erik Bray added the comment: > > Thank you! Has there been a separate issue opened for the > BufferedWriter bug or can that be covered by this issue as well? No other issue has been opened as I know of, but indeed it would be clearer to open a separate one.

[issue18876] Problems with files opened in append mode with io module

2013-09-05 Thread Erik Bray
Erik Bray added the comment: Thank you! Has there been a separate issue opened for the BufferedWriter bug or can that be covered by this issue as well? -- ___ Python tracker __

[issue18876] Problems with files opened in append mode with io module

2013-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I have committed your patch. Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18876] Problems with files opened in append mode with io module

2013-09-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset fc2b88a27fa1 by Antoine Pitrou in branch '2.7': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/fc2b88a27fa1 -- _

[issue18876] Problems with files opened in append mode with io module

2013-09-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33bd39b67cc1 by Antoine Pitrou in branch '3.3': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/33bd39b67cc1 New changeset b5530669ef70 by Antoine Pitrou

[issue18876] Problems with files opened in append mode with io module

2013-09-04 Thread Erik Bray
Changes by Erik Bray : Added file: http://bugs.python.org/file31588/issue_18876_patch_2.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18876] Problems with files opened in append mode with io module

2013-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. It looks mostly ok. Could you sign a contributor agreement so that we can move forward? http://www.python.org/psf/contrib/ -- ___ Python tracker _

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread Erik Bray
Erik Bray added the comment: Here's an initial stab at a simple patch that just addresses the issue of 'append' not being in the mode string. Amazingly this did not break a single existing test, though I added a new one to test how FileIO objects display their mode string after being initiali

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread Erik Bray
Erik Bray added the comment: >> Whereas the behavior of O_APPEND causes an automatic seek to the end >> before any write(). > True, but IIRC some systems seek on open() and some systems seek just before > write(). I figured that workaround that seeks to the end on open was an attempt to norma

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread Charles-François Natali
Charles-François Natali added the comment: > On which systems is O_APPEND not supported? It's part of the POSIX standard, > and even Windows seems to have it. That would be surprising. An easy way to find this out would be to remove the ifdef: 352 #ifdef O_APPEND 353 if (append) 354 flags |= O_

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: On which systems is O_APPEND not supported? It's part of the POSIX standard, and even Windows seems to have it. > Whereas the behavior of O_APPEND causes an automatic seek to the end > before any write(). True, but IIRC some systems seek on open() and some sys

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread Erik Bray
Erik Bray added the comment: Ah right, sorry about that. I just came over from the Trac site for one of my projects where the version field is used for affected versions :) -- ___ Python tracker __

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread R. David Murray
R. David Murray added the comment: Hi, Erik. I changed the versions because we use versions in this tracker to indicate which versions we intend to *fix* the problem in. I left 2.7 and 3.3 marked for the moment, but I have a feeling that this will need to be a feature-release-only change. N

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread R. David Murray
Changes by R. David Murray : -- nosy: +pitrou versions: +Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-lis

[issue18876] Problems with files opened in append mode with io module

2013-08-29 Thread Erik Bray
New submission from Erik Bray: I've come across a few difficulties of late with the io module's handling of files opened in append mode (any variation on 'a', 'ab', 'a+', 'ab+', etc. The biggest problem is that the io module does not in any way keep track of whether a file was opened in append