-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
In my ~/.pystartup I have the following code:
import atexit
import os
import readline
import rlcompleter
historyPath = os.path.expanduser("~/.pyhistory")
def save_history(historyPath=historyPath):
import readline
readline.write_history_file(historyPath)
if os.path.exists(historyPath):
readline.read_history_file(historyPath)
atexit.register(save_history)
del os, atexit, readline, rlcompleter, save_history, historyPath
This is something I've been using for years. With this startup file, I can enter the REPL and immediately up-arrow to scroll through the commands I used the last time I used the REPL.
With the new REPL there are two related things going wrong:
- my command history is not loaded (when I immediately up-arrow, it does nothing)
- my command history is not saved in my .pyhistory file (the file is touched but not otherwise modified)
CC @ambv, @pablogsal
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
paulclarkaranz
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error