[issue39719] tempfile.SpooledTemporaryFile still has softspace property

Shantanu report at bugs.python.org
Fri Feb 21 17:32:08 EST 2020


New submission from Shantanu <hauntsaninja at gmail.com>:

The softspace attribute of files was removed in Python 3 (mentioned in https://raw.githubusercontent.com/python/cpython/master/Misc/HISTORY)

However, tempfile.SpooledTemporaryFile still has a softspace property that attempts to return read the softspace attribute.

```
In [23]: t = tempfile.SpooledTemporaryFile()                                    

In [24]: t.softspace                                                            
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-24-72e5af9f6ded> in <module>
----> 1 t.softspace

/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py in softspace(self)
    749     @property
    750     def softspace(self):
--> 751         return self._file.softspace
    752 
    753     def tell(self):

AttributeError: '_io.BytesIO' object has no attribute 'softspace'
```

----------
messages: 362437
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: tempfile.SpooledTemporaryFile still has softspace property

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39719>
_______________________________________


More information about the Python-bugs-list mailing list