Skip to content

gh-151946: Fix Sphinx reference warnings in logging.handlers#152220

Open
BHUVANSH855 wants to merge 3 commits into
python:mainfrom
BHUVANSH855:gh-151946-logging-sphinx-warnings
Open

gh-151946: Fix Sphinx reference warnings in logging.handlers#152220
BHUVANSH855 wants to merge 3 commits into
python:mainfrom
BHUVANSH855:gh-151946-logging-sphinx-warnings

Conversation

@BHUVANSH855

Copy link
Copy Markdown

Summary

Fix Sphinx reference warnings in Doc/library/logging.handlers.rst by updating ambiguous cross-references to fully qualified references where appropriate and marking implementation-specific names that should not be cross-referenced.

The changes include:

  • Qualifying references to logging classes and constants.
  • Qualifying I/O method references to the appropriate io base classes.
  • Marking implementation-specific methods and attributes with ! where cross-references are not intended.

Issue

gh-151946

Testing

make -C Doc html SPHINXOPTS="-n -W --keep-going"

The documentation builds successfully with no Sphinx warnings.

@read-the-docs-community

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

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33436402 | 📁 Comparing 9379840 against main (7676427)

  🔍 Preview build  

49 files changed · ± 48 modified · - 1 deleted

± Modified

- Deleted

@BHUVANSH855 BHUVANSH855 force-pushed the gh-151946-logging-sphinx-warnings branch from 4e30421 to 11ee589 Compare June 25, 2026 16:59

@vsajip vsajip left a comment

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.

I'm also not sure if some people might think from these changes that streams have to inherit from IOBase, which they don't - as long as they obey duck-typing rules.

Comment thread Doc/library/logging.handlers.rst Outdated
string, for example '/dev/log'. In this case, a Unix domain socket is used to
send the message to the syslog. If *facility* is not specified,
:const:`LOG_USER` is used. The type of socket opened depends on the
:const:`~syslog.LOG_USER` is used. The type of socket opened depends on 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.

This isn't correct - LOG_USER and other such values are not imported from syslog. They are bit-shifted while computing the priority.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have made the requested changes; please review again.

Specifically, I changed the stream method references to implementation-neutral !write/!flush references to avoid implying that streams must inherit from IOBase, and changed LOG_USER to !LOG_USER since it is not imported from the syslog module.

I also verified that the documentation builds successfully with:

make -C Doc html SPHINXOPTS="-n -W --keep-going"

@bedevere-app

bedevere-app Bot commented Jun 26, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@BHUVANSH855 BHUVANSH855 force-pushed the gh-151946-logging-sphinx-warnings branch from 11ee589 to 4bfba97 Compare June 26, 2026 14:08
@BHUVANSH855 BHUVANSH855 requested a review from vsajip June 26, 2026 14:08
@BHUVANSH855

Copy link
Copy Markdown
Author

I have made the requested changes; please review again.

@bedevere-app

bedevere-app Bot commented Jun 27, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@BHUVANSH855

Copy link
Copy Markdown
Author

I have made the requested changes; please review again.

@bedevere-app

bedevere-app Bot commented Jul 6, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@picnixz

picnixz commented Jul 6, 2026

Copy link
Copy Markdown
Member

Please avoid asking more than once for a re-review unless some time has passed (usually after 2-3 weeks). And please don't update the PR using the "Update branch" button unless there is a reason to (like fixing the CI that may have failed on main but is now fixed) as it creates noise. See https://devguide.python.org/getting-started/pull-request-lifecycle/#update-branch-button.

In addition, avoid force-pushing once a review has been given. It makes incremental review close to impossible.

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

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants