FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-128066: Fixed PyREPL history saving on read-only file systems by vladimir-poghosyan · Pull Request #128088 · python/cpython · GitHub

Repository navigation

4 changes: 2 additions & 2 deletions Lib/site.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ def register_readline():
def write_history():
try:
readline_module.write_history_file(history)
except (FileNotFoundError, PermissionError):
except (FileNotFoundError, PermissionError, OSError) as e:
# home directory does not exist or is not writable
# https://bugs.python.org/issue19891
pass
_warn(f'failed to open the history file for writing: {e}', RuntimeWarning)

atexit.register(write_history)

Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed pyrepl history saving on read-only file systems.

Back | FazBrowse Home | New Git URL