[New-bugs-announce] [issue32600] SpooledTemporaryFile should implement IOBase

Greg Matous report at bugs.python.org
Fri Jan 19 13:31:53 EST 2018

New submission from Greg Matous <gregory.matous at gmail.com>:

SpooledTemporaryFile returns alternately a buffer or a TemporaryFile().

In either case it should behave like a file-thing.
However it doesn't implement certain properties in IOBase like readable, seekable which seems like should be available.

for example, on Ubuntu Linux with Python 3.6.2, 

reader = csv.reader(TextIOWrapper(csvfile), *args, **kwargs)

gives error AttributeError: 'SpooledTemporaryFile' object has no attribute 'readable'
when csvfile is a werkzeug.datastructures.FileStorage object

see also:

components: Library (Lib)
messages: 310281
nosy: dutchmo
priority: normal
severity: normal
status: open
title: SpooledTemporaryFile should implement IOBase
versions: Python 3.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list