Skip to content
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

gh-101100: Fix sphinx warnings in Doc/library/locale.rst #114425

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 22, 2024

Before:

/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:21: WARNING: py:mod reference target not found: _locale
/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:201: WARNING: py:const reference target not found: DAY_1
/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:237: WARNING: c:func reference target not found: regex
/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:582: WARNING: py:mod reference target not found: _locale
/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:582: WARNING: py:mod reference target not found: _locale
/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:608: WARNING: c:func reference target not found: gettext
/Users/sobolev/Desktop/cpython2/Doc/library/locale.rst:608: WARNING: c:func reference target not found: dcgettext

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

@sobolevn sobolevn requested a review from hugovk January 22, 2024 11:26
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Jan 22, 2024
@sobolevn sobolevn added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes docs Documentation in the Doc dir and removed docs Documentation in the Doc dir labels Jan 22, 2024
Comment on lines 629 to 634
.. function:: gettext(msg, /)
.. function:: dgettext(domain, msg, /)
.. function:: dcgettext(domain, msg, category, /)
.. function:: textdomain(domain, /)
.. function:: bindtextdomain(domain, dir, /)
.. function:: bind_textdomain_codeset(domain, codeset, /)
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if these / args do much to clarify here, shall we revert this bit? I don't think it fixed any warnings?

Copy link
Member Author

@sobolevn sobolevn Jan 22, 2024

Choose a reason for hiding this comment

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

Actual functions in locale do not accept keyword args, only pos-only ones. I think that the docs should reflect that. Why do you think that / is not helpful here?

Copy link
Member

Choose a reason for hiding this comment

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

We have many function signatures in docs that do not reflect the exact technical reality of the code, but instead simplify them, for readability, brevity, and simplicity.

@hugovk hugovk merged commit 7d21cae into python:main Jan 23, 2024
23 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 23, 2024
…honGH-114425)

* pythongh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
(cherry picked from commit 7d21cae)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 23, 2024
…honGH-114425)

* pythongh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
(cherry picked from commit 7d21cae)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-app
Copy link

bedevere-app bot commented Jan 23, 2024

GH-114477 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jan 23, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jan 23, 2024

GH-114478 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Jan 23, 2024
@hugovk
Copy link
Member

hugovk commented Jan 23, 2024

Thank you! 🧹📚

hugovk pushed a commit that referenced this pull request Jan 23, 2024
…-114425) (#114477)

gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` (GH-114425)

* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
(cherry picked from commit 7d21cae)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
hugovk pushed a commit that referenced this pull request Jan 23, 2024
…-114425) (#114478)

gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` (GH-114425)

* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
(cherry picked from commit 7d21cae)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…hon#114425)

* pythongh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…hon#114425)

* pythongh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants