[issue10354] tempfile.template is broken

Giampaolo Rodola' report at bugs.python.org
Mon Nov 8 13:04:59 CET 2010

Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

Patch including tests is in attachment.
I think I've just found two further bugs though:

>>> tempfile.TemporaryFile().name
>>> tempfile.TemporaryFile(prefix='xxx').name
>>> tempfile.SpooledTemporaryFile().name
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/giampaolo/svn/python-2.7/Lib/tempfile.py", line 574, in name
    return self._file.name
AttributeError: 'cStringIO.StringO' object has no attribute 'name'

I'm going to open two separate tickets.

Added file: http://bugs.python.org/file19542/tempfile.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list