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 howto/logging.rst #114846

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Feb 1, 2024

Before:

/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:521: WARNING: py:func reference target not found: setLevel
/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:1000: WARNING: py:class reference target not found: handlers.BufferingFormatter
/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:1032: WARNING: py:data reference target not found: raiseExceptions
/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:1037: WARNING: py:data reference target not found: raiseExceptions
/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:1037: WARNING: py:data reference target not found: raiseExceptions
/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:1074: WARNING: py:func reference target not found: expensive_func1
/Users/sobolev/Desktop/cpython2/Doc/howto/logging.rst:1074: WARNING: py:func reference target not found: expensive_func2

Changes:

  1. I remixed how pre-3.2 behaviour was specified using .. versionchanged in one place
  2. Added raiseExceptions doc, using its docstring from logging/__init__.py

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


For versions of Python prior to 3.2, the behaviour is as follows:
The event is output using a 'handler of last resort', stored in
:data:`lastResort`. This internal handler is not associated with any
Copy link
Member

Choose a reason for hiding this comment

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

lastResort, raiseExceptions etc. are module-level attributes - how come we don't use the :attr: role for them? Is my understanding of that role outdated?

Copy link
Member Author

@sobolevn sobolevn Feb 1, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for updating my knowledge.

Doc/howto/logging.rst Outdated Show resolved Hide resolved
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk hugovk merged commit dc01b91 into python:main Feb 1, 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-app
Copy link

Sorry, @sobolevn and @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker dc01b919c721f43ad024ba444a5d19541370e581 3.12

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 1, 2024
…-114846)

(cherry picked from commit dc01b91)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 1, 2024

GH-114872 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 Feb 1, 2024
@hugovk
Copy link
Member

hugovk commented Feb 1, 2024

Thanks! 🧹📖

hugovk added a commit that referenced this pull request Feb 1, 2024
…) (#114872)

gh-101100: Fix sphinx warnings in `howto/logging.rst` (GH-114846)

(cherry picked from commit dc01b91)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 1, 2024

GH-114878 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 Feb 1, 2024
hugovk added a commit to hugovk/cpython that referenced this pull request Feb 1, 2024
…ythonGH-114846)

(cherry picked from commit dc01b91)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Feb 1, 2024
…) (#114878)

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


Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
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.

3 participants