Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

The New REPL Does Not Load My Command History #120766

Open
Assignees
ambv
Labels
3.13bugs and security fixes3.14bugs and security fixestopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@ericsnowcurrently

Description

@ericsnowcurrently

Bug report

Bug description:

In my ~/.pystartup I have the following code:

importatexitimportosimportreadlineimportrlcompleterhistoryPath=os.path.expanduser("~/.pyhistory")defsave_history(historyPath=historyPath):importreadlinereadline.write_history_file(historyPath)ifos.path.exists(historyPath):readline.read_history_file(historyPath)atexit.register(save_history)delos,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

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixestopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp