[issue10954] No warning for csv.writer API change

2011-03-19 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- nosy: -skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10954 ___ ___ Python-bugs-list

[issue10954] No warning for csv.writer API change

2011-03-19 Thread John Machin
John Machin sjmac...@lexicon.net added the comment: The doc patch proposed by Skip on 2001-01-24 for this bug has NOT been reviewed, let alone applied. Sibling bug #7198 has been closed in error. Somebody please help. -- nosy: +skip.montanaro ___

[issue10954] No warning for csv.writer API change

2011-03-19 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Since this is not a doc issue, doc people would not especially see it. That aside... What is *your* review. Does it satisfy you? Answer on #7198 if you want. And please be a bit patient as people are learning the new hg system. --

[issue10954] No warning for csv.writer API change

2011-03-19 Thread John Machin
John Machin sjmac...@lexicon.net added the comment: Terry, I have already made the point the docs bug is #7198. This is the meaningful-exception bug. My review is changing 'should' to 'must' is not very useful without a consistent interpretation of what those two words mean and without any

[issue10954] No warning for csv.writer API change

2011-01-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The API change would be generating an error if newline='' wasn't specified. Amplifying the bytes-case error message would be fine, though. On the other hand, we are in RC phase, and I'm not at all sure this is important enough to go

[issue10954] No warning for csv.writer API change

2011-01-23 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Can we have a concrete proposal in the form of a patch, please? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10954 ___

[issue10954] No warning for csv.writer API change

2011-01-23 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Looking at the csv.rst file I see this statement early in the py3k docs: If *csvfile* is a file object, it should be opened with ``newline=''``. There is also a footnote about the consequences of leaving it out: .. [#] If ``newline=''`` is

[issue10954] No warning for csv.writer API change

2011-01-23 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: My suggestion attached. -- keywords: +patch Added file: http://bugs.python.org/file20497/csv.rst.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10954

[issue10954] No warning for csv.writer API change

2011-01-23 Thread John Machin
John Machin sjmac...@lexicon.net added the comment: Skip, the docs bug is #7198. This is the meaningful-exception bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10954 ___

[issue10954] No warning for csv.writer API change

2011-01-22 Thread John Machin
John Machin sjmac...@lexicon.net added the comment: I don't understand Changing csv api is a feature request that could only happen in 3.3. This is NOT a request for an API change. Lennert's point is that an API change was made in 3.0 as compared with 2.6 but there is no fixer in 2to3. What

[issue10954] No warning for csv.writer API change

2011-01-22 Thread Lennart Regebro
Lennart Regebro rege...@gmail.com added the comment: In the worst case, not checking for newline='' is not a big problem, as anyone moving from Python 2 to Python 3 will open the file in binary mode. That error message could tell the user to use binary mode newlines=''. Using textmode and

[issue10954] No warning for csv.writer API change

2011-01-21 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Failing when passed a bytesIO object seems reasonable. I question the bit about newlines though. The doc does not specify that newlines='' is needed on output. While is says it is needed for input, why? Why is a mix of '\n', '\r\n', and '\r'

[issue10954] No warning for csv.writer API change

2011-01-21 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Changing csv api is a feature request that could only happen in 3.3. -- nosy: +skip.montanaro type: behavior - feature request versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2 ___ Python

[issue10954] No warning for csv.writer API change

2011-01-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Newline='' is indeed needed. It preserves the newlines so that the csv module can correctly parse them according to the weird csv quoting roles. And for output, the fact that it isn't documented there is a an issue that was only

[issue10954] No warning for csv.writer API change

2011-01-20 Thread Lennart Regebro
New submission from Lennart Regebro rege...@gmail.com: In Python 2 the file used for csv.writer() should be opened in binary mode, while in Python 3 is should be opened in text mode but with newlines set to ''. This change is neither warned for by python -3, nor is there a fixer for it (and

[issue10954] No warning for csv.writer API change

2011-01-20 Thread Lennart Regebro
Changes by Lennart Regebro rege...@gmail.com: -- nosy: +sjmachin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10954 ___ ___ Python-bugs-list

[issue10954] No warning for csv.writer API change

2011-01-20 Thread John Machin
John Machin sjmac...@lexicon.net added the comment: I believe that both csv.reader and csv.writer should fail with a meaningful message if mode is binary or newline is not '' -- ___ Python tracker rep...@bugs.python.org