This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients georg.brandl, jtaylor, ncoghlan, pitrou, r.david.murray
Date 2013-05-03.17:40:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367602831.62.0.668001621739.issue17895@psf.upfronthosting.co.za>
In-reply-to
Content
Given the following property of TemporaryFile:

"Under Unix, the directory entry for the file is removed immediately after the file is created. Other platforms do not support this; your code should not rely on a temporary file created using this function having or not having a visible name in the file system."
(from http://docs.python.org/dev/library/tempfile.html#tempfile.TemporaryFile)

I find it absurd to expect the name attribute to return an actual filename, since it won't exist anymore by the time you use it (under Unix, at least). So, we could return an invalid filename, but I don't see the point, and the current behaviour is as good as any other.

If you want a usable name, by definition you must use NamedTemporaryFile. Recommend closing.
History
Date User Action Args
2013-05-03 17:40:31pitrousetrecipients: + pitrou, georg.brandl, ncoghlan, r.david.murray, jtaylor
2013-05-03 17:40:31pitrousetmessageid: <1367602831.62.0.668001621739.issue17895@psf.upfronthosting.co.za>
2013-05-03 17:40:31pitroulinkissue17895 messages
2013-05-03 17:40:31pitroucreate