[issue15833] most failures to write byte-compiled file no longer suppressed
Roundup Robot added the comment: New changeset 53ce30b62de2 by Trent Nelson in branch '3.3': Issue #15833: don't raise an exception if importlib can't write byte-compiled http://hg.python.org/cpython/rev/53ce30b62de2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Roundup Robot added the comment: New changeset 36b2ca7dc893 by Trent Nelson in branch 'default': Merge issue #15833: don't raise an exception if importlib can't write http://hg.python.org/cpython/rev/36b2ca7dc893 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Trent Nelson added the comment: Charles' patch applied in 3.3 and merged to 3.x. Thanks Charles. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Charles-François Natali added the comment: Charles' patch applied in 3.3 and merged to 3.x. Thanks Charles. Thanks for taking care of this! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Trent Nelson added the comment: FWIW, I just ran into the following on Solaris 10: % dbx python For information about new features see `help changes' To remove this message, put `dbxenv suppress_startup_message 7.9' in your .dbxrc Reading python Reading ld.so.1 Reading libsocket.so.1 Reading libnsl.so.1 Reading libintl.so.1 Reading librt.so.1 Reading libdl.so.1 Reading libsendfile.so.1 Reading libm.so.2 Reading libthread.so.1 Reading libc.so.1 Reading libaio.so.1 Reading libmd.so.1 (dbx) run Running: python (process id 17819) Reading libc_psr.so.1 Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File frozen importlib._bootstrap, line 1558, in _find_and_load File frozen importlib._bootstrap, line 1525, in _find_and_load_unlocked File frozen importlib._bootstrap, line 586, in _check_name_wrapper File frozen importlib._bootstrap, line 1023, in load_module File frozen importlib._bootstrap, line 1004, in load_module File frozen importlib._bootstrap, line 562, in module_for_loader_wrapper File frozen importlib._bootstrap, line 854, in _load_module File frozen importlib._bootstrap, line 990, in get_code File frozen importlib._bootstrap, line 1051, in _cache_bytecode File frozen importlib._bootstrap, line 1065, in set_data OSError: [Errno 30] Read-only file system: '/home/cpython/nfs/src/3.x/Lib/encodings/__pycache__' t@1 (l@1) signal ABRT (Abort) in __lwp_kill at 0x7e2dc2c0 0x7e2dc2c0: __lwp_kill+0x0008: bcc,a,pt %icc,__lwp_kill+0x18 ! 0x7e2dc2d0 Current function is Py_FatalError 2360 abort(); (dbx) q q: not found (dbx) quit Testing the 'import_error.diff' patch now... -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Trent Nelson added the comment: That... didn't work. Also applied rpetrov's patch and that made no difference: % ./python Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File frozen importlib._bootstrap, line 1558, in _find_and_load File frozen importlib._bootstrap, line 1525, in _find_and_load_unlocked File frozen importlib._bootstrap, line 586, in _check_name_wrapper File frozen importlib._bootstrap, line 1023, in load_module File frozen importlib._bootstrap, line 1004, in load_module File frozen importlib._bootstrap, line 562, in module_for_loader_wrapper File frozen importlib._bootstrap, line 854, in _load_module File frozen importlib._bootstrap, line 990, in get_code File frozen importlib._bootstrap, line 1051, in _cache_bytecode File frozen importlib._bootstrap, line 1065, in set_data OSError: [Errno 30] Read-only file system: '/home/cpython/nfs/src/3.x/Lib/encodings/__pycache__' zsh: IOT instruction (core dumped) ./python -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Trent Nelson added the comment: Charles: your patch is fine. +1. My Solaris failures can be traced back to http://bugs.python.org/issue15819. Sorry for the noise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Charles-François Natali added the comment: Charles-François's patch looks ok to me. I don't know if this warrants adding a test. Yes, and triggering a failure other than a permission error (which is probably already tested) can be difficult. I'm abroad and won't be able to commit it until at least a week, so if someone's willing to commit it before go ahead :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Charles-François Natali added the comment: Yes . Charles, lest assume that all other issues with build system, are resolved and source tree is ready for use. So in this situation I could run python , I could build all and I could run tests with an additional patch TEMPDIR is relative to build tree (patch 0014-* from recent archive uploaded to issue #3754) . Note without you patch. In my build environment test_imp fail on test_source. So what is result with you patch on this test ? Sorry, I'm not a native English speaker, and I don't understand what you're talking about. The issue at hand is that bytecode creation only catches EPERM and EEXIST, but other errors can be raised on a read-only filesystem (EROFS, EIO in some strange cases). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Antoine Pitrou added the comment: Charles-François's patch looks ok to me. I don't know if this warrants adding a test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Charles-François Natali added the comment: Here's a patch. -- Added file: http://bugs.python.org/file27469/import_error.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Charles-François Natali added the comment: Roumen, are you sure you submitted your patch to the right issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Roumen Petrov added the comment: Yes . Charles, lest assume that all other issues with build system, are resolved and source tree is ready for use. So in this situation I could run python , I could build all and I could run tests with an additional patch TEMPDIR is relative to build tree (patch 0014-* from recent archive uploaded to issue #3754) . Note without you patch. In my build environment test_imp fail on test_source. So what is result with you patch on this test ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Charles-François Natali added the comment: We should probably catch all OSErrors, and log a warning in verbose mode, as suggested by Antoine. Catching individual errnos is tedious and error-prone. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
STINNER Victor added the comment: Issue #16139 has been marked as a duplicate of this issue. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Roumen Petrov added the comment: Did 0016-CROSS-reload-may-fail-with-operation-on-closed-file-.patch fix issue ? -- keywords: +patch nosy: +rpetrov Added file: http://bugs.python.org/file27443/0016-CROSS-reload-may-fail-with-operation-on-closed-file-.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
New submission from Richard Oudkerk: 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. -- components: Interpreter Core keywords: 3.3regression messages: 169564 nosy: brett.cannon, sbt priority: normal severity: normal status: open title: most failures to write byte-compiled file no longer suppressed type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Antoine Pitrou added the comment: Raising EIO in a read-only dir sounds weird. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Brett Cannon added the comment: So it might be a change, but I don't know if I would claim it is a regression that needs changing. If you can't write bytecode files for some reason other than permissions or the file already exists then there is something wrong with your setup that you might not be expecting. I don't know what this EIO error code is, but it sounds non-standard for the situation and thus not something we should blindly be ignoring. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15833] most failures to write byte-compiled file no longer suppressed
Eric Snow added the comment: I was thinking along the same lines, though it might make sense for EROFS and a few others. (http://aplawrence.com/Unixart/errors.html) -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com