GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-138577: Mention limitations of `getpass.getpass(echo_char=...)` by yagggi · Pull Request #138677 · python/cpython

Conversation

@yagggi

@yagggi yagggi commented Sep 8, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: getpass's echo_char should not affect keyboard shortcuts #138577

📚 Documentation preview 📚: https://cpython-previews--138677.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yagggi
Mention unexpected behavior of getpass.getpass() in document
fffc644
@bedevere-app bedevere-app Bot added the awaiting review label Sep 8, 2025
@python-cla-bot

python-cla-bot Bot commented Sep 8, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Sep 8, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs Sep 8, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Sep 8, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Sep 8, 2025
getpass's echo_char should not affect keyboard shortcuts #138577
Closed
@yagggi
Merge branch 'main' into getpass-doc
cd7dc2c
@picnixz picnixz changed the title gh-138577: Mention unexpected behavior of getpass.getpass() in document gh-138577: Mention limitations of getpass.getpass(echo_char=...) Sep 8, 2025
StanFromIreland
StanFromIreland reviewed Sep 8, 2025
View reviewed changes
Comment thread Doc/library/getpass.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/getpass.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

brianschubert
brianschubert reviewed Sep 8, 2025
View reviewed changes
Comment thread Doc/library/getpass.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

yagggi and others added 2 commits September 9, 2025 02:11
@yagggi @brianschubert
Improve wording
d8fe91b
Co-authored-by: Brian Schubert <[email protected]>
@yagggi
Remove trailing whitespace
40470ab
picnixz
picnixz reviewed Sep 8, 2025
View reviewed changes
Comment thread Doc/library/getpass.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/getpass.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@yagggi
Revise formatting: use :manpage: to generate link; remove github issu…
942016c
…e link.
@picnixz picnixz added the needs backport to 3.14 bugs and security fixes label Sep 8, 2025
@picnixz
picnixz merged commit 074f3b2 into python:main Sep 9, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 9, 2025
@miss-islington-app

miss-islington-app Bot commented Sep 9, 2025

Copy link
Copy Markdown

Thanks @yagggi for the PR, and @picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting review label Sep 9, 2025
@picnixz

picnixz commented Sep 9, 2025

Copy link
Copy Markdown
Member

Thank you for the fix!

yagggi reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
@yagggi @miss-islington
pythongh-138577: Mention Unix-specific limitations of `getpass.getpas…
b9f6450
…s(echo_char=...)` (pythonGH-138677)

In bf8bbe9, `getpass.getpass` gained
the ability to provide keyboard feedback through `echo_char`.

On Unix, line editing shortcuts such as Ctrl+U were previously handled
as the terminal operates in canonical mode (see termios(3)). However,
since keyboard feedback requires to switch to noncanonical mode, this
now results in an inconsistency when `getpass.getpass` uses `echo_char`
as those shortcuts are no more supported. This limitation is specific
to Unix and does not affect Windows users where line editing shortcuts
were never supported.
(cherry picked from commit 074f3b2)

Co-authored-by: yagggi <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 9, 2025

Copy link
Copy Markdown

GH-138696 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 9, 2025
hugovk pushed a commit that referenced this pull request Sep 9, 2025
@miss-islington @yagggi
[3.14] gh-138577: Mention Unix-specific limitations of `getpass.getpa…
2162fcc
…ss(echo_char=...)` (GH-138677) (#138696)

Co-authored-by: yagggi <[email protected]>
@yagggi

yagggi commented Sep 9, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @picnixz for your patience and guidance, glad to do something to CPython.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lkollar pushed a commit to lkollar/cpython that referenced this pull request Sep 9, 2025
@yagggi @lkollar
pythongh-138577: Mention Unix-specific limitations of `getpass.getpas…
5439234
…s(echo_char=...)` (python#138677)

In bf8bbe9, `getpass.getpass` gained
the ability to provide keyboard feedback through `echo_char`.

On Unix, line editing shortcuts such as Ctrl+U were previously handled
as the terminal operates in canonical mode (see termios(3)). However,
since keyboard feedback requires to switch to noncanonical mode, this
now results in an inconsistency when `getpass.getpass` uses `echo_char`
as those shortcuts are no more supported. This limitation is specific
to Unix and does not affect Windows users where line editing shortcuts
were never supported.
@nouraellm nouraellm mentioned this pull request Sep 25, 2026
gh-157538: Read getpass() input in non-canonical mode #157805
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@brianschubert brianschubert brianschubert left review comments
@StanFromIreland StanFromIreland StanFromIreland left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@yagggi @picnixz @brianschubert @StanFromIreland
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.