As discussed in
http://bugs.python.org/issue15819
trying to run python built outside a read-only source directory fails for me because OSError(EIO, ...) is raised when importlib tries to write the byte compiled file. (I built python in a Linux VM using VMware Player which only had read-only access to the source directory.)
Currently importlib only ignores PermissionError (EACCES, EPERM) and FileExistsError (EEXIST):
http://hg.python.org/cpython/file/d54f047312a8/Lib/importlib/_bootstrap.py#l1080
Under Python 3.2 all failures are ignored:
http://hg.python.org/cpython/file/69952b5599b5/Python/import.c#l905
so this seems to be a regression. |