[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Charles-François Natali
Charles-François Natali added the comment: I've committed the fix. As for improving the randomness of the temporary file name, I'm not against it (I'm just not convinced it's necessary). -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___

[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27d31f0c4ad5 by Charles-François Natali in branch 'default': Issue #14077: importlib: Fix regression introduced by de6703671386. http://hg.python.org/cpython/rev/27d31f0c4ad5 -- nosy: +python-dev ___ Pyt

[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Brett Cannon
Brett Cannon added the comment: 2012/2/21 Charles-François Natali But in other VMs id() is simply a number that gets assigned to objects that is monotonically increasing. So it can be extremely deterministic if the object creation order is consistent. -- _

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali added the comment: > But that will also fail if id(path) happens to be fairly > deterministic Well, if you always get the same id(path), then yes, but I really doubt it, especially with CPython where it's the object's address (I guess there's the same chance of having

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > IIRC, the reason is to avoid having a stale pyc file indefinitely in > case of crash: > if we always used, let's say, path + '.tmp', if the process crashes > before the rename, then all subsequent attempts to write the bytecode > will fail because of the stale

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali added the comment: > But is there still a reason to use id(path) then? IIRC, the reason is to avoid having a stale pyc file indefinitely in case of crash: if we always used, let's say, path + '.tmp', if the process crashes before the rename, then all subsequent attempts

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > I am proposing the following patch to have a better unique > > filename: > > It's unneeded, O_EXCL ensures the file won't be corrupted. > It's actually a regression introduced by de6703671386. My bad. > Here's a patch. But is there still a reason to use id

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali added the comment: > I am proposing the following patch to have a better unique > filename: It's unneeded, O_EXCL ensures the file won't be corrupted. It's actually a regression introduced by de6703671386. My bad. Here's a patch. -- keywords: +patch Added file:

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I am proposing the following patch to have a better unique filename: diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -129,8 +129,8 @@ def _path_absolute(path): def

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
New submission from Antoine Pitrou : Just saw this on a buildbot: == ERROR: test_rapid_restart (test.test_multiprocessing.WithProcessesTestManagerRestart) -- T