New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove os.tmpnam() and os.tempnam() #45659
Comments
I couldn't stand the compiler warnings any more. :) The patch removes os.tmpnam() and os.tempnam() from the posix module. It |
-1. First, they are linker warnings, not compiler warnings (I suppose), |
Martin, why do we need to keep these when we already have tempfile.py? |
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, |
Removing them because there is a replacement already is a better reason As you say, tempfile is not any better from a security point of view in Whether the tempfile.py implementation is actually better than the one If the rationale for the patch is to eliminate duplication, then |
os.tmpfile() is the only method that has no duplicate in tempfile. I I totally agree with your opinion on tmpnam and tempnam. As far as I The promise of tempfile.mkstemp is also bogus for every OS except Let me rephrase the rational for my patch: I want to remove duplicate |
Why do you say that? tempfile.mkstemp() does essentially the same
Please read the code. It tries to set the CLOEXEC flag on Unix,
As I said, I agree with most of this rationale, except that I'm With this rationale, again, I think tmpfile should be removed as Regards, |
Christian can you revise your patch to also remove os.tmpfile per |
Guido van Rossum wrote:
I can do that for you. But I still believe that os.tmpfile() works Christian |
2007/10/25, Christian Heimes <report@bugs.python.org>:
True. But tempfile.TemporaryFile() returns a temp file without a name. |
Committed revision 58657. Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: