-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
getpass's echo_char should not affect keyboard shortcuts #138577
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
Bug description:
Hitting
Ctrl+Ushould clear the line but this is badly handled whenecho_charis given:See #138514 (comment).
This issue stems from the fact that we switch to non-canonical mode (https://www.man7.org/linux/man-pages/man3/termios.3.html). The rationale is that in canonical mode, we only have a line-by-line feedback (so we would see the characters only when we hit ENTER, which is not really useful...)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
getpass.getpass(echo_char=...)#138677getpass.getpass(echo_char=...)(GH-138677) #138696