This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients georg.brandl, gvanrossum, jaywalker, jdwhitley, pitrou, r.david.murray, sjmachin, skip.montanaro, vstinner
Date 2009-04-02.17:55:25
SpamBayes Score 1.6653345e-16
Marked as misclassified No
Message-id <18900.64521.455016.305184@montanaro.dyndns.org>
In-reply-to <1238626930.63.0.618944711325.issue4847@psf.upfronthosting.co.za>
Content
David> I've added some unit tests for embedded newlines, and py3k csv
    David> passes (on linux at least) when newline='' is used.  Unless
    David> someone can provide a test case that fails when newline='' is
    David> used, I propose we fix the documentation and leave the code
    David> alone.

This thread is getting a bit long.  Can someone summarize how the expected
usage of the csv module is supposed to change?  If I read things correctly,
instead of requiring (in the general case) that csv files be opened in
binary mode, the requirement will be that they be opened with newline=''.
This will thwart any attempts by the io module at newline translation, but
since the file is still opened in text mode its contents will implicitly be
Unicode (or Unicode translated to bytes with a specific encoding).  That
encoding will also be specified in the call to open().

Is this about correct?  Do any test cases need to be updated or added?  I
notice that something called BytesIO is imported from io but not used.  Were
some test cases removed which used to involve that class or is that a 2to3
artifact?

Skip
History
Date User Action Args
2009-04-02 17:55:27skip.montanarosetrecipients: + skip.montanaro, gvanrossum, georg.brandl, sjmachin, pitrou, vstinner, r.david.murray, jaywalker, jdwhitley
2009-04-02 17:55:26skip.montanarolinkissue4847 messages
2009-04-02 17:55:25skip.montanarocreate