-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-138514: getpass: restrict echo_char
to a single ASCII character
#138591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
picnixz
merged 32 commits into
python:main
from
benjaminjohnson01:gh-138514-fix-getpass-echo-char
Sep 16, 2025
Merged
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
7d412d9
Accept only single character with getpass.getpass(echo_char) (see: gh…
benjaminjohnson01 a99e900
accept suggestion to reword blurb
benjaminjohnson01 bbd741a
reword echo_char description per suggestion
benjaminjohnson01 4338c9f
reword echo_char error message per suggestion
benjaminjohnson01 37a0a72
reword getpass echo_char news per suggestion
benjaminjohnson01 b063e33
fix getpass echo_char spacing per suggestion
benjaminjohnson01 5151819
Merge branch 'main' into gh-138514-fix-getpass-echo-char
benjaminjohnson01 fcda047
remove
benjaminjohnson01 4eb5701
modify
benjaminjohnson01 a183a71
Merge branch 'main' into gh-138514-fix-getpass-echo-char
benjaminjohnson01 e8d08f8
modify TypeError message
benjaminjohnson01 749cc7d
modify TypeError message again
benjaminjohnson01 a6aed93
add comma to ValueError message
benjaminjohnson01 8385bc5
Merge branch 'main' into gh-138514-fix-getpass-echo-char
benjaminjohnson01 d1281cb
Merge branch 'main' into gh-138514-fix-getpass-echo-char
benjaminjohnson01 7253600
accept suggestion from picnixz
benjaminjohnson01 cf0cc73
accept language suggestion from picnixz
benjaminjohnson01 58f86cd
accept spacing suggestion from picnixz
benjaminjohnson01 6bb99d3
accept leftover artifact removal suggestion from picnixz
benjaminjohnson01 fde711f
add new line per suggestion
benjaminjohnson01 acc7bca
use subTest for getpass echo_char tests
benjaminjohnson01 461fd5b
switch to one-liner style
benjaminjohnson01 301ef46
use @support.subTests syntax
benjaminjohnson01 6e148e5
match style
benjaminjohnson01 caded77
match style further
benjaminjohnson01 981d49d
remove too-verbose comments
benjaminjohnson01 07534ce
remove too-verbose comments
benjaminjohnson01 2203e03
simplify non-ascii tests using ascii
benjaminjohnson01 6485375
test every non-printable ascii byte
benjaminjohnson01 2e7bd33
Merge branch 'main' into gh-138514-fix-getpass-echo-char
benjaminjohnson01 3629a53
remove s characters
benjaminjohnson01 e2ba1b7
Merge branch 'main' into gh-138514-fix-getpass-echo-char
benjaminjohnson01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2025-09-06-11-26-21.gh-issue-138514.66ltOb.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Force :func:`getpass.getpass` to accept only a single character. Patch by | ||
Benjamin Johnson. | ||
benjaminjohnson01 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.