[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58657. Thanks! -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Christian Heimes
Changes by Christian Heimes: Added file: http://bugs.python.org/file8612/py3k_remove_os_tmp.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: 2007/10/25, Christian Heimes <[EMAIL PROTECTED]>: > I can do that for you. But I still believe that os.tmpfile() works > different than tempfile.mkstemp(). The former returns a file descriptor > of a file w/o directory entry and the later a file in tempfile.tem

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Christian can you revise your patch to also remove os.tmpfile per > Martin's request? Make sure unit tests and docs are fixed too. I can do that for you. But I still believe that os.tmpfile() works different than tempfile.mkstemp().

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: Christian can you revise your patch to also remove os.tmpfile per Martin's request? Make sure unit tests and docs are fixed too. __ Tracker <[EMAIL PROTECTED]>

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Martin v. Löwis
Martin v. Löwis added the comment: > os.tmpfile() is the only method that has no duplicate in tempfile. Why do you say that? tempfile.mkstemp() does essentially the same as os.tmpfile(). > The promise of tempfile.mkstemp is also bogus for every OS except > Windows. IIRC only Windows supports O_

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-25 Thread Christian Heimes
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()?

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-23 Thread Martin v. Löwis
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

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-23 Thread Christian Heimes
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. _

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-23 Thread Guido van Rossum
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

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-23 Thread Christian Heimes
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