Skip to content

gh-72327: Add help message for pip in REPL #8536

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

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'main' into fix-issue-28140
  • Loading branch information
tomviner authored Nov 28, 2021
commit e092342a4f1efc6d01e9e15e9baf61db2c76aa52
10 changes: 9 additions & 1 deletion Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,16 @@ def _register_readline():
readline.read_history_file(history)
except OSError:
pass
atexit.register(readline.write_history_file, history)

def write_history():
try:
readline.write_history_file(history)
except OSError:
# bpo-19891, bpo-41193: Home directory does not exist
# or is not writable, or the filesystem is read-only.
pass

atexit.register(write_history)

def _register_detect_pip_usage_in_repl():
old_excepthook = sys.excepthook
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
from test.support import captured_stderr
from test.support.os_helper import TESTFN, EnvironmentVarGuard, change_cwd
import builtins
import io
import os
import sys
import re
import encodings
import glob
import io
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.