[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib tempfile.py,1.34,1.34.4.1

Michael Hudson mwh@python.net
17 Mar 2002 18:01:11 +0000


Michael Hudson <mwh@users.sourceforge.net> writes:

> [and]
> 
> New TemporaryFile implementation for Windows:  this doesn't need a
> TemproraryFileWrapper wrapper anymore, and should be immune from the
> problem that a temp file inherited by a spawned process caused an
> attempt to close the temp file in the spawning process to blow
> up (the unlink in TemporaryFileWrapper.close() blew up with a
> "Permission denied" error because, despite that the temp file got
> closed in the spawning process, the spawned process still had it open
> by virtue of C-level file descriptor inheritance).  In context,
> that bug took days to figure out <wink/sigh>.
> 

Balls.  This depends on revision 2.219 of posixmodule.c:

Expose more MS WIndows constants usable w/ low-level os.open().

Which looks decidely feature-ish to me.

I'll back out this change to tempfile.py, but am open to persuasion
that this is a sufficiently important bugfix to include it and the
changes to posixmodule.c instead.

Cheers,
M.

-- 
  I have a feeling that any simple problem can be made arbitrarily
  difficult by imposing a suitably heavy administrative process
  around the development.       -- Joe Armstrong, comp.lang.functional