Skip to content

gh-101100: Fix sphinx warnings in howto/logging.rst - #114846

Merged
hugovk merged 3 commits into
python:mainfrom
sobolevn:issue-101100-howto-logging
Feb 1, 2024
Merged

hugovk merged 3 commits into
python:mainfrom
sobolevn:issue-101100-howto-logging

Conversation

@sobolevn

@sobolevn sobolevn commented Feb 1, 2024 •

Copy link
Copy Markdown
Member

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/

Comment thread Doc/howto/logging.rst

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
Copy Markdown
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?

@sobolevn sobolevn Feb 1, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Thanks for updating my knowledge.

Comment thread Doc/howto/logging.rst Resolved
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk
hugovk merged commit dc01b91 into python:main Feb 1, 2024
@miss-islington-app

Copy link
Copy Markdown

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
Copy Markdown

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

bedevere-app Bot commented Feb 1, 2024

Copy link
Copy Markdown

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

hugovk commented Feb 1, 2024

Copy link
Copy Markdown
Member

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

bedevere-app Bot commented Feb 1, 2024

Copy link
Copy Markdown

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 only 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

3 participants