]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-124096: Enable REPL virtual terminal support on Windows (#124119)
authorY5 <124019959+y5c4l3@users.noreply.github.com>
Sun, 23 Feb 2025 19:30:33 +0000 (03:30 +0800)
committerGitHub <noreply@github.com>
Sun, 23 Feb 2025 19:30:33 +0000 (20:30 +0100)
commita65366ed879a3d9f27cbcc811ed2e05ad1a2af06
tree24446b1acaf844ba65a606b449b7feed93a50424
parent25a7ddf2efeaf77bcf94dbfca28ba3a6fe9ab57e
gh-124096: Enable REPL virtual terminal support on Windows (#124119)

To support virtual terminal mode in Windows PYREPL, we need a scanner
to read over the supported escaped VT sequences.

Windows REPL input was using virtual key mode, which does not support
terminal escape sequences. This patch calls `SetConsoleMode` properly
when initializing and send sequences to enable bracketed-paste modes
to support verbatim copy-and-paste.

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: wheeheee <104880306+wheeheee@users.noreply.github.com>
Lib/_pyrepl/base_eventqueue.py [new file with mode: 0644]
Lib/_pyrepl/unix_eventqueue.py
Lib/_pyrepl/windows_console.py
Lib/_pyrepl/windows_eventqueue.py [new file with mode: 0644]
Lib/test/test_pyrepl/test_eventqueue.py [moved from Lib/test/test_pyrepl/test_unix_eventqueue.py with 68% similarity]
Misc/NEWS.d/next/Library/2024-09-16-17-03-52.gh-issue-124096.znin0O.rst [new file with mode: 0644]