Skip to content

[Windows] New REPL does not preserve history between sessions #125154

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
pfmoore opened this issue Oct 8, 2024 · 7 comments
Closed

[Windows] New REPL does not preserve history between sessions #125154

pfmoore opened this issue Oct 8, 2024 · 7 comments
Labels
OS-windows topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@pfmoore
Copy link
Member

pfmoore commented Oct 8, 2024

Bug report

Bug description:

I have downloaded Python 3.13.0, Windows 64 bit version from python.org. I have done nothing to customise it.

I start Python. type "12" at the REPL, and press enter. The value 12 is displayed. I hit Ctrl-Z to exit (same happens if I type "exit"). I restart Python and hit the up arrow key. It does not retrieve the "12" from my previous session.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

@pfmoore pfmoore added the type-bug An unexpected behavior, bug, or error label Oct 8, 2024
@hroncok
Copy link
Contributor

hroncok commented Oct 8, 2024

I was unable to reproduce this problem on Fedora. This might be Windows-specific.

@tomasr8 tomasr8 added the topic-repl Related to the interactive shell label Oct 8, 2024
@devdanzin
Copy link
Contributor

This is a (supposedly) known limitation, as history support in Windows hasn't been added so far. I took a stab at it in #122274.

@pfmoore
Copy link
Member Author

pfmoore commented Oct 8, 2024

:-(

That's something that should probably be publicised much better, then, as it's a surprising and (in my case at least) frustrating limitation compared to the old OS-provided REPL. I'm not sure it's bad enough that I'd switch off the new REPL, but it will take some getting used to.

@skirpichev
Copy link
Member

Sounds like #121245 reappears. Does this build has readline support?

@vstinner vstinner changed the title New REPL does not preserve history between sessions [Windows] New REPL does not preserve history between sessions Oct 9, 2024
@vstinner
Copy link
Member

vstinner commented Oct 9, 2024

Sounds like #121245 reappears. Does this build has readline support?

Windows has no readline module.

@jmw182
Copy link

jmw182 commented Oct 23, 2024

In previous versions of python3, installing pyreadline3 added readline support to Windows, which enabled REPL history between sessions. This does not work in python 3.13.

@vstinner
Copy link
Member

This issue is a duplicate of #122273 which was fixed by 3c7a90a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

7 participants