FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

PyREPL corrupts attribute completion input on WSL/Windows Terminal · Issue #158955 · python/cpython · GitHub

Repository navigation

PyREPL corrupts attribute completion input on WSL/Windows Terminal #158955

Description

Bug description

Python 3.15.0rc3's new PyREPL corrupts the input line when accepting an attribute completion in WSL under Windows Terminal.

The completion candidates themselves are correct, but the resulting input text is corrupted.

Reproducer

>>> a = "Bug"
>>> a.swapcase()
'bUG'
>>> a.s<TAB><TAB>
a.split       a.splitlines  a.startswith  a.strip       a.swapcase
>>> a.sapcase()
'bUG'

The completion list correctly contains a.swapcase, but accepting the completion produces a.sapcase().

Environment

  • Python: 3.15.0rc3
  • Build: main, Oct 3 2026, 01:07:55
  • Compiler: Clang 22.1.3
  • OS: Linux under WSL
  • Terminal: Windows Terminal
  • TERM=xterm-256color
  • TERM_PROGRAM is unset

Isolation tests

The problem is specific to PyREPL:

python3.15
    → broken

PYTHON_BASIC_COMPLETER=1 python3.15
    → broken

PYTHON_COLORS=0 python3.15
    → broken

PYTHON_BASIC_REPL=1 python3.15
    → works correctly

Therefore changing the completer or disabling colors does not resolve the problem. Disabling PyREPL entirely does.

Expected behavior

After selecting a.swapcase from the completion list, the input should be:

a.swapcase()

Actual behavior

The input line is corrupted, for example:

a.sapcase()

The resulting expression nevertheless executes the swapcase() method, suggesting that the completion/input state and the displayed/reconstructed input line may be getting out of sync.

Additional information

This is reproducible with the standard Python 3.15.0rc3 REPL and does not require third-party Python packages.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibStandard Library Python modules in the Lib/ directorytopic-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


      Back | FazBrowse Home | New Git URL