classification
Title: Minor edits to faulthandler doc
Type: Stage: patch review
Components: Documentation Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.araujo, python-dev, vstinner
Priority: normal Keywords: needs review, patch

Created on 2011-05-29 17:30 by eric.araujo, last changed 2014-03-25 14:44 by eric.araujo. This issue is now closed.

Files
File name Uploaded Description Edit
faulthandler-doc.diff eric.araujo, 2011-05-29 17:30 review
Messages (8)
msg137206 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-29 17:30
I made some grammar fixes in faulthandler.rst and tweaked the example to better show what the module does.

I’d like to fix the synopsis too: “dump the Python traceback” is not very clear to me.  It is the traceback or the stack trace?  Why is it called “the” traceback?  Something like “dumping the stack trace on CPython crashes” would be better IMO.
msg137231 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-05-30 00:23
What do you call a "stack trace"? I use this term in the C language, especially when using the "where" command of gdb. In Python, the stack trace is called a "traceback". Anyway, faulthandler prints the Python trace, not the C trace, so I prefer to call it a "traceback" than "stack trace".

faulthandler.dump_traceback() output is similar to:

    try:
        raise ValueError()
    except:
        exctype, value, tb = sys.exc_info()
        traceback.print_tb(tb)

faulthandler doesn't print the line from the script, only the function name, file name and line number; and the first line is different.
msg137265 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-30 13:27
> faulthandler prints the Python trace, not the C trace, so I prefer to
> call it a "traceback" than "stack trace".
Okay.  What do you think about this synopsis then: dumping the traceback on CPython crashes?
msg137274 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-05-30 13:52
> dumping the traceback on CPython crashes?

faulthandler is no more specific to crashes: you can dump the tracebacks while Python is running using a signal or an explicit call to faulthandler.dump_traceback().
msg137275 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-30 13:54
Okay, I understand now that the traceback always exists, not only during exceptions.  The module gives control over the display of that traceback.  Am I right?
msg214811 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-25 11:35
New changeset a97dcdee35f9 by Victor Stinner in branch '3.4':
Issue #12209: Minor edits to faulthandler doc. Patch written by Éric Araujo.
http://hg.python.org/cpython/rev/a97dcdee35f9

New changeset 6f80ca0012ae by Victor Stinner in branch 'default':
(Merge 3.4) Issue #12209: Minor edits to faulthandler doc. Patch written by
http://hg.python.org/cpython/rev/6f80ca0012ae
msg214812 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-03-25 11:36
Sorry for the delay. I applied your patch.
msg214827 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-25 14:44
Thanks!
History
Date User Action Args
2014-03-25 14:44:08eric.araujosetmessages: + msg214827
2014-03-25 11:36:24vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg214812
2014-03-25 11:35:38python-devsetnosy: + python-dev
messages: + msg214811
2011-05-30 13:54:29eric.araujosetmessages: + msg137275
2011-05-30 13:52:08vstinnersetmessages: + msg137274
2011-05-30 13:27:59eric.araujosetmessages: + msg137265
2011-05-30 00:23:35vstinnersetmessages: + msg137231
2011-05-29 17:30:03eric.araujocreate