Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.13] gh-128066: Properly handle history file writes for RO fs on PyREPL (gh-134380) #134386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import _sitebuiltins
import io
import stat
import errno

# Prefixes for site-packages; add additional prefixes like /usr/local here
PREFIXES = [sys.prefix, sys.exec_prefix]
Expand Down Expand Up @@ -576,6 +577,11 @@ def write_history():
# home directory does not exist or is not writable
# https://bugs.python.org/issue19891
pass
except OSError:
if errno.EROFS:
pass # gh-128066: read-only file system
else:
raise

atexit.register(write_history)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fixes an edge case where PyREPL improperly threw an error when Python is
invoked on a read only filesystem while trying to write history file
entries.
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.