Issue 32600: SpooledTemporaryFile should implement IOBase (original) (raw)

Issue32600

Created on 2018-01-19 18:31 by dutchmo, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg310281 - (view) Author: Greg Matous (dutchmo) Date: 2018-01-19 18:31
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: https://stackoverflow.com/questions/47160211/why-doesnt-tempfile-spooledtemporaryfile-implement-readable-writable-seekable
msg310290 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2018-01-19 21:45
There is apparently some work done on this already in Issue 26175.
History
Date User Action Args
2022-04-11 14:58:56 admin set github: 76781
2018-01-19 21:45:34 martin.panter set status: open -> closedsuperseder: Fully implement IOBase abstract on SpooledTemporaryFilenosy: + martin.pantermessages: + resolution: duplicatestage: resolved
2018-01-19 18:31:53 dutchmo create