classification
Title: importlib should exclusively open bytecode files
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: out of date
Dependencies: Superseder: Writing a pyc file is not atomic
View: 13146
Assigned To: brett.cannon Nosy List: brett.cannon, jnoller
Priority: normal Keywords:

Created on 2010-08-22 22:24 by brett.cannon, last changed 2011-12-02 23:33 by brett.cannon. This issue is now closed.

Messages (3)
msg114714 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-08-22 22:24
Importlib does not use any OS-level protections to gain exclusivity when opening a file like import.c does through open_exclusive. It probably should, though, when writing bytecode else one might end up with corrupt code. That's bad as bad marshal data is a flat-out import failure and not simply glossed over.

Plus if I don't do this now I will just end up getting a bug report that test_multiprocessing is randomly failing on the buildbots because of this issue since that "precious" little test seems to love to ferret out concurrency issues in importlib.
msg114716 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2010-08-22 23:02
Nice.
msg148780 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-12-02 23:33
Fixed by Issue13146.
History
Date User Action Args
2011-12-02 23:33:41brett.cannonsetstatus: open -> closed
resolution: out of date
messages: + msg148780

superseder: Writing a pyc file is not atomic
stage: test needed ->
2010-08-22 23:02:54jnollersetnosy: + jnoller
messages: + msg114716
2010-08-22 22:24:11brett.cannoncreate