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 martin.panter
Recipients Eugene Viktorov, SilentGhost, georg.brandl, martin.panter
Date 2016-02-19.01:09:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This looks like an extension of Issue 21058. Does the unlink() work on Windows? It seems to me that the file is configured to remove itself on close(), therefore I expect unlink() will raise an exception of its own. Also made some suggestions in the code review.

This problem also affects Python 2, if you fudge the right wrong parameters:

>>> NamedTemporaryFile((), prefix="blaua.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/proj/python/cpython/Lib/", line 477, in NamedTemporaryFile
    file = _os.fdopen(fd, mode, bufsize)
TypeError: argument 2 must be string, not tuple
[59140 refs]
>>> glob("/tmp/blaua.*")
Date User Action Args
2016-02-19 01:09:48martin.pantersetrecipients: + martin.panter, georg.brandl, SilentGhost, Eugene Viktorov
2016-02-19 01:09:48martin.pantersetmessageid: <>
2016-02-19 01:09:48martin.panterlinkissue26385 messages
2016-02-19 01:09:48martin.pantercreate