Skip to content

gh-101100: Fix Sphinx warnings in library/faulthandler.rst - #118353

Merged
hugovk merged 1 commit into
python:mainfrom
hugovk:docs-fix-sphinx-warnings-faulthandler
Apr 28, 2024
Merged

hugovk merged 1 commit into
python:mainfrom
hugovk:docs-fix-sphinx-warnings-faulthandler

Conversation

@hugovk

@hugovk hugovk commented Apr 27, 2024 •

Copy link
Copy Markdown
Member

Fix 13 warnings:

library/faulthandler.rst:11: WARNING: py:const reference target not found: SIGSEGV
library/faulthandler.rst:11: WARNING: py:const reference target not found: SIGFPE
library/faulthandler.rst:11: WARNING: py:const reference target not found: SIGABRT
library/faulthandler.rst:11: WARNING: py:const reference target not found: SIGBUS
library/faulthandler.rst:11: WARNING: py:const reference target not found: SIGILL
library/faulthandler.rst:18: WARNING: c:func reference target not found: sigaltstack
library/faulthandler.rst:73: WARNING: py:const reference target not found: SIGSEGV
library/faulthandler.rst:73: WARNING: py:const reference target not found: SIGFPE
library/faulthandler.rst:73: WARNING: py:const reference target not found: SIGABRT
library/faulthandler.rst:73: WARNING: py:const reference target not found: SIGBUS
library/faulthandler.rst:73: WARNING: py:const reference target not found: SIGILL
library/faulthandler.rst:107: WARNING: c:func reference target not found: _exit
library/faulthandler.rst:107: WARNING: c:func reference target not found: _exit

Link the SIG* py:consts to the signal module, and add ! to the c:funcs which I don't think need documenting.


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

@AlexWaygood

Copy link
Copy Markdown
Member

PR title is interesting 👀

@hugovk hugovk changed the title gh-101100: Add GitHub Action to ensure code changes include tests Apr 27, 2024
@hugovk

hugovk commented Apr 27, 2024 •

Copy link
Copy Markdown
Member Author

Haha, it was a mistake, corrected now!

I had some extra stuff on main, was playing around with https://github.com/brettcannon/check-for-changed-files/ to try python/core-workflow#480 (didn't get it working...). Rebased my branch before creating the PR but it kept the old default title :)

@hugovk hugovk changed the title gh-101100: Fix Sphinx warnings in library/faulthandler.rst Apr 27, 2024
Comment on lines +111 to +112
:c:func:`!_exit` with status=1 after dumping the tracebacks. (Note
:c:func:`!_exit` exits the process immediately, which means it doesn't do 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.

Is this the same as https://docs.python.org/3/library/os.html#os._exit? Should this link to that, maybe?

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.

I don't think so, it's calling the C one from unistd.h:

# include <unistd.h> // _exit()

if (thread.exit)
_exit(1);

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 think os._exit is just a very thin wrapper around the C one:

cpython/Modules/posixmodule.c

Lines 6613 to 6619 in e0ab642

static PyObject *
os__exit_impl(PyObject *module, int status)
/*[clinic end generated code: output=116e52d9c2260d54 input=5e6d57556b0c4a62]*/
{
_exit(status);
return NULL; /* Make gcc -Wall happy */
}

But yes, good point, they're not exactly the same!

@hugovk
hugovk merged commit 33c6cf3 into python:main Apr 28, 2024
@hugovk
hugovk deleted the docs-fix-sphinx-warnings-faulthandler branch April 28, 2024 18:06
@miss-islington-app

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 28, 2024
…ythonGH-118353)

(cherry picked from commit 33c6cf3)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Apr 28, 2024

Copy link
Copy Markdown

GH-118366 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 Apr 28, 2024
hugovk added a commit that referenced this pull request Apr 28, 2024
…H-118353) (#118366)

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

2 participants