Commit Graph

12 Commits

Author SHA1 Message Date
Łukasz Langa 891232f338
[3.13] gh-131878: Fix input of unicode characters with two or more code points in new pyrepl on Windows (gh-131901) (gh-133468)
(cherry picked from commit 0c5151bc81)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-05-05 23:08:09 +02:00
Łukasz Langa e4d68488bc
[3.13] GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe (GH-132440) (GH-133460)
(cherry picked from commit 07f416a3f0)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-05 20:09:34 +02:00
Miss Islington (bot) a2bf7a0a47
[3.13] gh-124096: Enable REPL virtual terminal support on Windows (GH-124119) (GH-133457)
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.
(cherry picked from commit a65366ed87)

Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
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>
2025-05-05 19:39:06 +02:00
Miss Islington (bot) 4c6318e24d
[3.13] gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389) (GH-130500)
gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389)

Fix `Lib/_pyrepl/windows_console.py` to support more keybindings, like the
`Ctrl`+`←` and `Ctrl`+`→` word-skipping keybindings and those with meta (i.e. Alt),
e.g. to `kill-word` or `backward-kill-word`.

Specifics: if Ctrl is pressed, emit "ctrl left" and "ctrl right" instead of just "left" or
"right," and if Meta/Alt is pressed, emit the special key code for meta before
emitting the other key that was pressed.
(cherry picked from commit 688f3a0d4b)

Co-authored-by: Paulie Peña <203125+paulie4@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2025-03-03 16:57:53 +01:00
Miss Islington (bot) 0ddcb61ffe
[3.13] gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485) (#129155)
gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485)
(cherry picked from commit 5a9afe2362)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-21 22:15:57 +00:00
Miss Islington (bot) 862ec8bd51
[3.13] gh-124628: Pyrepl inputs on Windows shouldn't always be blocking reads (GH-124629) (#124638)
gh-124628: Pyrepl inputs on Windows shouldn't always be blocking reads (GH-124629)
(cherry picked from commit 83e5dc0f4d)

Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2024-09-27 11:45:06 -07:00
Miss Islington (bot) 5c3078d6e5
[3.13] gh-120221: Support KeyboardInterrupt in asyncio REPL (GH-123795) (#123799)
This switches the main pyrepl event loop to always be non-blocking so that it
can listen to incoming interruptions from other threads.

This also resolves invalid display of exceptions from other threads
(gh-123178).

This also fixes freezes with pasting and an active input hook.
(cherry picked from commit 033510e11d)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-09-06 22:25:19 +02:00
Miss Islington (bot) 67851201d8
[3.13] gh-123572: Fix key codes in VK_MAP in windows_console.py (GH-122692) (#123632)
gh-123572: Fix key codes in VK_MAP in windows_console.py (GH-122692)
(cherry picked from commit 782217f28f)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2024-09-03 15:01:14 +01:00
Miss Islington (bot) 7a90d94df7
[3.13] gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217) (#122451)
gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217)
(cherry picked from commit d1a1bca1f0)

Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2024-07-30 12:34:22 -07:00
Miss Islington (bot) 51724620e8
[3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429)
gh-120417: Remove unused imports in the stdlib (GH-120420)
(cherry picked from commit 4c6d4f5cb3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-06-12 19:27:32 +00:00
Łukasz Langa eea45ea213
[3.13] gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843) (GH-120066)
(cherry picked from commit d9095194dd)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-06-04 21:26:10 +02:00
Miss Islington (bot) d6faac6d1f
[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)
(cherry picked from commit 0d07182821)

Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-31 17:18:28 +02:00