This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients asvetlov, brian.curtin, flox, jafo, jaraco, loewis, r.david.murray, techtonik, tim.golden
Date 2010-04-09.13:05:31
SpamBayes Score 1.2478163e-10
Marked as misclassified No
Message-id <1270818334.21.0.114788890224.issue7443@psf.upfronthosting.co.za>
In-reply-to
Content
If the problem with the fix is that lots of tests use test_support.unlink, then I don't see why the rename dance can't be implemented in test_support.unlink.  (Possibly conditioned on whether or not the tests are running on a windows platform.)  Dealing with unlink problems is why that method exists in the first place.

There are probably places in the test suite that *don't* use test_support.unlink, though, so fixing test_support.unlink will not necessarily fix all of the problems. We'll have to fix those other tests (probably by using the new test_support.unlink) as we find them.

An actual patch will need a test that doesn't rely on win32file (ctypes would be OK).  It may be necessary to rename to a unique filename, too. (To be clear, I think a unit test that reproduces the problem by doing an open with FILE_SHARE_DELETE is fine, we don't need a test that reproduces the race condition itself.  The windows experts will correct me if I'm wrong :)

I'm changing the stage to patch needed because it seems to me that using a technique like rename that doesn't introduce additional delays into the test suite is to be preferred.
History
Date User Action Args
2010-04-09 13:05:34r.david.murraysetrecipients: + r.david.murray, loewis, jafo, jaraco, techtonik, tim.golden, brian.curtin, asvetlov, flox
2010-04-09 13:05:34r.david.murraysetmessageid: <1270818334.21.0.114788890224.issue7443@psf.upfronthosting.co.za>
2010-04-09 13:05:32r.david.murraylinkissue7443 messages
2010-04-09 13:05:31r.david.murraycreate