GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe#132440
GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe#132440ambv merged 13 commits into
Conversation
|
Adding @vstinner, @eendebakpt and @paulie4 , since they were involved in #128389 and already talked about AltGr. |
Sorry, something went wrong.
|
PS: switching to an english keyboard layout, I can use the AltGr key like right-Alt, since it is not used in this keyboard layout :) |
Sorry, something went wrong.
|
The failing of Ubuntu (free-threading) is definitely unrelated, since this is a Windows specific change. |
Sorry, something went wrong.
|
Do you think it'd be possible to add some tests for this change to ensure we don't accidentally regress again? |
Sorry, something went wrong.
|
Yeah, I've already thought about it, but am still unsure how to best do it. ATM, I am thinking of mocking cpython/Lib/_pyrepl/windows_console.py Line 411 in b87189d to be able to test cpython/Lib/_pyrepl/windows_console.py Lines 426 to 432 in b87189d AFAICT, all the existing tests just mock WDYT? |
Sorry, something went wrong.
|
Agreed that we shouldn't be mocking |
Sorry, something went wrong.
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
because it will be part of 131901, anywayy
because it is unused
ambv
left a comment
There was a problem hiding this comment.
Excellent work again! Very well thought through.
Sorry, something went wrong.
|
Thanks @chris-eibl for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
|
Sorry, @chris-eibl and @ambv, I could not cleanly backport this to |
Sorry, something went wrong.
|
Will repeat here too - problem with backport because VT support was not backported #130805 (comment) (for completeness) |
Sorry, something went wrong.
|
Yeah, I am backporting the VT support too because it's the only way we can have a sensibly similar codebase for bug fixes. |
Sorry, something went wrong.
…ltGr on cmd.exe (pythonGH-132440) (cherry picked from commit 07f416a) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
… cmd.exe (pythonGH-132440) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
E.g. on my keyboard with German layout,
{is usually entered via pressing the AltGr key and7, i.e.AltGr+7.Likewise,
},[,],\and some more can only be entered viaAltGr.But since #128388 / #128389 these are swallowed by the REPL on Windows and can no longer be entered.
This happens in legacy Windows terminals, where the virtual terminal mode is turned off (e.g.
cmd.exe).In virtual terminal mode there are other issues, see #131878.