Open ericsnowcurrently opened 1 week ago
Hummm, it looks like this code it's using readline
to handle the story but the new REPL doesn't use readline
at all so this will never work. Notice that this will also not work the same if you compile Python against libedit
instead of readline
because it has different history handling (to the point I know).
@ambv what do you think? Maybe we can monkey patch readline.read_history_file
somehow in the new REPL but I am concerned of the side effects.
I have made a workaround for this issue: https://github.com/python/cpython/issues/121160#issuecomment-2198246116.
@whitequark, AFAIK that's a different issue.
The new REPL noes not use the readline
Python module at all. readline.read_history_file
won't affect it, regardless of the backend.
Bug report
Bug description:
In my ~/.pystartup I have the following code:
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:
CC @ambv, @pablogsal
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux