[issue13175] packaging uses wrong line endings in RECORD files on Windows

Éric Araujo report at bugs.python.org
Mon Oct 17 18:12:13 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

>>> The file passed to csv.writer should be opened with newline=''.
>> How will we port this to 2.x?
> No idea :-( The 2.7 documentation says use the 'b' flag, but that
> probably doesn't allow an encoding parameter (it doesn't on 3.x).

Ah, I see that newline controls newline translation.  We use codecs.open in distutils2; I think it uses universal newlines mode.  We’ll figure it out, the important part is to have good tests.

> The test fails before the fix, passes after. It's a no-op on platforms
> where text and binary files are the same, (i.e., non-Windows systems).
> So it's harmless.

Great.  I’ll look at your patch and try to port it to distutils2.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13175>
_______________________________________


More information about the Python-bugs-list mailing list