Author X-Istence
Recipients Decorater, X-Istence, berker.peksag, rr-, vstinner
Date 2016-11-18.05:19:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479446392.94.0.656670666768.issue27777@psf.upfronthosting.co.za>
In-reply-to
Content
@berker.peksag:

Attached is a patch with a test case that exercises this issue.

Code path is that read_single() checks if the length is greater than 0, and then it reads binary, otherwise it reads it as a single line. This fixes make_file so that if self.length is greater than or equal to 0, it opens the file in binary mode, this matches the checks that write stuff as binary.

This also undoes the change that was made in https://bugs.python.org/issue24764. Fixing this issue fixed that one as well, and arguably throwing data away doesn't seem like a good idea.
History
Date User Action Args
2016-11-18 05:19:53X-Istencesetrecipients: + X-Istence, vstinner, berker.peksag, Decorater, rr-
2016-11-18 05:19:52X-Istencesetmessageid: <1479446392.94.0.656670666768.issue27777@psf.upfronthosting.co.za>
2016-11-18 05:19:52X-Istencelinkissue27777 messages
2016-11-18 05:19:52X-Istencecreate