Skip to content

Python 3.13.0b1 REPL changes behavior wrt PgUp, inserts first line of ~/.python_history #119034

Closed
@hroncok

Description

@hroncok

Bug report

Bug description:

When I use the Python REPL, I am used to PgUp browsing my prompt history based on the partial command I already typed.

Consider:

>>> import sys
>>> import os
>>> ...
>>> im[PgUp]

Python 3.12 REPL inserts import os with my cursor between m and p. I can keep pressing PgUp to get import sys and older commands from my history. I don't know if this is Fedora's configuration of readline, or the default. However, Bash and older Python REPLs behave that way, as well as IPython/Jupyter console.

Python 3.130b1 REPL changes my prompt to print("a") when I press PgUp. The particular command is my first line of ~/.python_history. Pressing PgUp again changes nothing.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    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