Christian Heimes added the comment:
os.tmpfile() is the only method that has no duplicate in tempfile. I
chose to keep it for this very reason. But you made good point, too.
What do you think about renaming tmpfile to _tmpfile and make it
available from the tempfile module as tempfile.tmpfile()?
Martin v. Löwis added the comment:
Removing them because there is a replacement already is a better reason
than removing them because they give (bogus) warnings, so I'm -0 now.
As you say, tempfile is not any better from a security point of view in
the cases where tmpnam or tempnam would be used
Christian Heimes added the comment:
First, you are right. It's not a compiler but a linker warning.
I don't see the point in keeping the methods. They are dangerous to use,
warned upon for a long time and they have a sane replacement that does a
far better job.
_
Guido van Rossum added the comment:
Martin, why do we need to keep these when we already have tempfile.py?
I don't see that they solve any particular POSIX compatibility
requirement. And they *are* unsafe. (Admitted, sometimes there's no
alternative -- even tempfile.py still provides unsafe AP
New submission from Christian Heimes:
I couldn't stand the compiler warnings any more. :)
The patch removes os.tmpnam() and os.tempnam() from the posix module. It
also updates the docs and tests. TMP_MAX is kept for the tempfile
module. I haven't figured out how to remove the defines from pyconf