James Hennessy added the comment:
The quickest fix for the data corruption problem is to delete the line
newfile.seek(file.tell(), 0)
from the rollover() method.
This doesn't fix the inconsistency of tell() and seek(), but it's very low
risk. It's technically a change t
James Hennessy added the comment:
I don't like the idea of using a TemporaryFile right from the beginning in text
mode. You might as well remove text mode support altogether if that's the
approach you want to take, since it undoes any potential performance benefit
James Hennessy added the comment:
I have to disagree with the idea that SpooledTemporaryFile is not useful.
Although on some systems, the file system may appear as fast as memory, that
cannot be assumed to be universally true. I think the idea behind
SpooledTemporaryFile is completely
New submission from James Hennessy:
The tempfile.SpooledTemporaryFile class doesn't correctly preserve data for
text (non-binary) SpooledTemporaryFile objects when Unicode characters are
written. The attached program demonstrates the failure. It creates a
SpooledTemporaryFile object, w