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 75
75
import _sitebuiltins
76
76
import io
77
77
import stat
78
+ import errno
78
79
79
80
# Prefixes for site-packages; add additional prefixes like /usr/local here
80
81
PREFIXES = [sys .prefix , sys .exec_prefix ]
@@ -576,6 +577,11 @@ def write_history():
576
577
# home directory does not exist or is not writable
577
578
# https://bugs.python.org/issue19891
578
579
pass
580
+ except OSError :
581
+ if errno .EROFS :
582
+ pass # gh-128066: read-only file system
583
+ else :
584
+ raise
579
585
580
586
atexit .register (write_history )
581
587
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