Skip to content

Add missing cross-references to improve navigation in getpass.rst#151092

Open
sergiolpzgmz wants to merge 2 commits into
python:mainfrom
sergiolpzgmz:add-missing-cross-references-in-getpass
Open

Add missing cross-references to improve navigation in getpass.rst#151092
sergiolpzgmz wants to merge 2 commits into
python:mainfrom
sergiolpzgmz:add-missing-cross-references-in-getpass

Conversation

@sergiolpzgmz

Copy link
Copy Markdown
Contributor

No description provided.

@sergiolpzgmz sergiolpzgmz force-pushed the add-missing-cross-references-in-getpass branch from 34dc965 to c5d4779 Compare June 8, 2026 16:11
@read-the-docs-community

read-the-docs-community Bot commented Jun 8, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33043241 | 📁 Comparing 7425148 against main (11a8bdf)

  🔍 Preview build  

1 file changed
± library/getpass.html

Comment thread Doc/library/getpass.rst

If echo free input is unavailable getpass() falls back to printing
a warning message to *stream* and reading from ``sys.stdin`` and
If echo free input is unavailable :meth:`~getpass.getpass` falls back to printing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to link to a function in its documentation, see the style guide for more information on links. However, you also found a linklint bug (or workaround)!

CC @nedbat for the bug.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:meth: is tested, and works. It looks like the problem here with linklint is getpass.getpass vs getpass. In this line, I tried all combinations (using ' here instead of `):
:meth:'getpass' is linked.
:meth:'getpass.getpass' is linked
:meth:'~getpass.getpass' is linked
:func:'getpass' is NOT linked.
:func:'getpass.getpass' is linked
:func:'~getpass.getpass' is linked
So to remain unlinked, the type has to match (func), and the name can't be fully qualified. I thought linklint was better about that....

@StanFromIreland StanFromIreland mentioned this pull request Jun 8, 2026
Comment thread Doc/library/getpass.rst

If echo free input is unavailable getpass() falls back to printing
a warning message to *stream* and reading from ``sys.stdin`` and
If echo free input is unavailable :meth:`~getpass.getpass` falls back to printing

@nedbat nedbat Jun 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are here:

Suggested change
If echo free input is unavailable :meth:`~getpass.getpass` falls back to printing
If echo-free input is unavailable :func:`getpass` falls back to printing

Comment thread Doc/library/getpass.rst

.. note::
If you call getpass from within IDLE, the input may be done in the
If you call :meth:`~getpass.getpass` from within IDLE, the input may be done in the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you call :meth:`~getpass.getpass` from within IDLE, the input may be done in the
If you call :func:`getpass` from within IDLE, the input may be done in the

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants