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 vajrasky
Recipients barry, flox, orsenthil, serhiy.storchaka, vajrasky
Date 2013-08-12.11:22:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376306540.5.0.50590461443.issue18394@psf.upfronthosting.co.za>
In-reply-to
Content
It happens because if the length of data is more than 1000:

    def __write(self, line):
        """line is always bytes, not string"""
        if self.__file is not None:
            if self.__file.tell() + len(line) > 1000:
                self.file = self.make_file()
                data = self.__file.getvalue()
                self.file.write(data)
                self.__file = None
        ......

it will create a temporary file.

Attached the patch to close the temporary file in the destructor method.

About the 1000 number, should we put it in constant? Why 1000? This number is so random. For now, I just leave it as it is.
History
Date User Action Args
2013-08-12 11:22:20vajraskysetrecipients: + vajrasky, barry, orsenthil, flox, serhiy.storchaka
2013-08-12 11:22:20vajraskysetmessageid: <1376306540.5.0.50590461443.issue18394@psf.upfronthosting.co.za>
2013-08-12 11:22:20vajraskylinkissue18394 messages
2013-08-12 11:22:20vajraskycreate