Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-101100: Resolve reference warnings in library/stdtypes.rst #138420

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

Open
AA-Turner wants to merge 2 commits into python:main
base: main
Choose a base branch
Loading
from AA-Turner:docs/refwarn/stdtypes

Conversation

Copy link
Member

@AA-Turner AA-Turner commented Sep 3, 2025
edited by bedevere-app bot
Loading

@AA-Turner AA-Turner added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Sep 3, 2025
@AA-Turner AA-Turner changed the title (削除) Resolve reference warnings in library/stdtypes.rst (削除ここまで) (追記) GH-101100: Resolve reference warnings in library/stdtypes.rst (追記ここまで) Sep 3, 2025
Copy link
Member

I think that the right fix for this is to add anchors instead of removing references.

Copy link
Member Author

@serhiy-storchaka I've generally been hesitant to suppress cross-references, but I think all the instances here make sense, given their context. Are there some specific ones you would revert?

A

another set. The :class:`frozenset` type is immutable and :term:`hashable` ---
its contents cannot be altered after it is created; it can therefore be used as
a dictionary key or as an element of another set.
like :meth:`add <frozenset.add>` and :meth:`remove <frozenset.add>`.
Copy link
Member

@serhiy-storchaka serhiy-storchaka Sep 3, 2025

Choose a reason for hiding this comment

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

There is no frozenset.add().

Copy link
Member Author

@AA-Turner AA-Turner Sep 3, 2025

Choose a reason for hiding this comment

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

Because set and frozenset are documented together, there is no cross-reference target for set.add, it is labelled as frozenset.add instead. This link goes to the correct place.

Copy link
Member

@serhiy-storchaka serhiy-storchaka Sep 3, 2025

Choose a reason for hiding this comment

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

But this is a wrong name for anchor. We should do something with this.

Copy link
Member Author

@AA-Turner AA-Turner Sep 3, 2025

Choose a reason for hiding this comment

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

I agree. I plan to fix it, but it requires changes (& a release) of Sphinx. This PR makes the reference link to the right place, and more importantly means that no future reference errors can be introduced into stdtypes.rst.

Once it is fixed, I plan to go back and update here & a few other places where we have used a different target to the intended one.

Copy link
Member

Are there some specific ones you would revert?

All of them? See my suggestion #101100 (comment) . After implementing it the references in footnotes will gone, as they will become the part of the method description, and many other references will became working. After that we can check what remains.

Copy link
Member Author

See #138474, putting this in draft for now.

A

# Conflicts:
#	Doc/library/stdtypes.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@aisk aisk aisk left review comments

@hugovk hugovk Awaiting requested review from hugovk hugovk is a code owner

@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka

Assignees
No one assigned
Labels
awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /