Leon Matthews added the comment:
I've attached a patch to SpooledTemporaryFile (and its test class) to
remove the suprising exceptions.
SpooledTemporaryFile uses a io.StringIO for storage (in self._file)
until it reaches a certain size (or rollover() is called), at which
point it switches to a
New submission from Leon Matthews :
According the docs for the tempfile module, SpooledTemporaryFile()
should operate "exactly as TemporaryFile() does". However, while
playing around trying to learn the module I found a couple of places
where this is not the case:
import tempfile
hello = byte