Message56750
> 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_NOINHERIT.
Please read the code. It tries to set the CLOEXEC flag on Unix,
which should work on most systems.
> Let me rephrase the rational for my patch: I want to remove duplicate
> code to have just but one implementation to create a temporary file
> (name). I want the one implementation be under our control and not
> depend on some possible broken or stupid C library like Windows where
> tmpnam may create the temporary files in C:\. I want an unified way to
> get the TEMP dir independent of the API.
As I said, I agree with most of this rationale, except that I'm
uncertain whether it is good to trade a stupid C library for a
stupid Python implementation.
With this rationale, again, I think tmpfile should be removed as
well.
Regards,
Martin |
|
| Date |
User |
Action |
Args |
| 2007-10-25 17:12:03 | loewis | set | spambayes_score: 0.000264902 -> 0.00026490167 recipients:
+ loewis, gvanrossum, christian.heimes |
| 2007-10-25 17:12:03 | loewis | link | issue1318 messages |
| 2007-10-25 17:12:02 | loewis | create | |
|