File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Misc/NEWS.d/next/Core_and_Builtins Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 7575import _sitebuiltins
7676import io
7777import stat
78+ import errno
7879
7980# Prefixes for site-packages; add additional prefixes like /usr/local here
8081PREFIXES = [sys .prefix , sys .exec_prefix ]
@@ -576,6 +577,11 @@ def write_history():
576577 # home directory does not exist or is not writable
577578 # https://bugs.python.org/issue19891
578579 pass
580+ except OSError :
581+ if errno .EROFS :
582+ pass # gh-128066: read-only file system
583+ else :
584+ raise
579585
580586 atexit .register (write_history )
581587
Original file line number Diff line number Diff line change 1+ Fixes an edge case where PyREPL improperly threw an error when Python is
2+ invoked on a read only filesystem while trying to write history file
3+ entries.
You can’t perform that action at this time.
0 commit comments