You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the first issue I submit so please correct me if I do anything wrong.
Description of the issue:
imporlib logs 'wrote <path to .pyc file>' even when file creation fails with OSError (for lack of write persmission for example)
Reproducing the bug in Python 3.6 on ubuntu 16.04:
Output:
# could not create '/home/quentin/tmp/pycache/spam.cpython-36.pyc': PermissionError(13, 'Permission denied')
# wrote '/home/quentin/tmp/pycache/spam.cpython-36.pyc'
Reason:
SourceFileLoader.set_data() silences OSError raised by _write_atomic (importlib/_bootstrap_external.py line 875)
Then SourceLoader.get_code() does not see that something went awry and logs file creation (same file, line 789)
If it is worth fixing I would be glad to contribute a patch, but would probably need a little guidance.
New changeset 9e14e49 by Miss Islington (bot) (Quentin Agren) in branch 'master': bpo-35024: Remove redundant and possibly incorrect verbose message after writing '.pyc' (GH-9998) 9e14e49
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: