This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Document cgitb.text and cgitb.html
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: berker.peksag, docs@python, iritkatriel, martin.panter, serhiy.storchaka, xmorel
Priority: normal Keywords:

Created on 2017-03-27 13:16 by xmorel, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 849 merged xmorel, 2017-03-27 13:57
PR 1527 closed berker.peksag, 2017-05-10 08:50
PR 1528 closed berker.peksag, 2017-05-10 08:52
Messages (8)
msg290608 - (view) Author: Xavier Morel (xmorel) * Date: 2017-03-27 13:16
Currently, cgitb documents the hook (enable) and somewhat unclearly the ability to dump the HTML traceback to stdout, but despite that being technically available it does not document the ability to dump the traceback to a string as either text or html.

Possible further improvement: make ``cgitb.html`` and ``cgitb.text`` implicitly call `sys.exc_info()` if not given a parameter (much like `cgitb.handler` does).
msg290612 - (view) Author: Xavier Morel (xmorel) * Date: 2017-03-27 13:57
PR targetted to master rather than 2.7
msg293072 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-05-05 08:15
New changeset c07b3a15be5e0a68a73b4c532861ed8de6932bd2 by Berker Peksag (masklinn) in branch 'master':
bpo-29920: Document cgitb.text() and cgitb.html() functions (GH-849)
https://github.com/python/cpython/commit/c07b3a15be5e0a68a73b4c532861ed8de6932bd2
msg293394 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-10 09:24
The main functions of the cgitb module are enable() and handler(). I would describe them first, and text() and html() at the end (maybe in separate subsection). Actually the main part of the descriptions of text() and html() can be shared and placed in a paragraph preceding them: "The following two functions handle..."

Note that the documented name of the first parameter is "info", but actual name is "einfo".
msg294926 - (view) Author: Xavier Morel (xmorel) * Date: 2017-06-01 09:51
Should I close this since the PR was merged?
msg294929 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-06-01 10:25
I suggest to move the descriptions of text() and html() after handle(). And I don't know what to do with the discrepancy in the parameter name.
msg294949 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-06-01 14:48
Please don't close it yet. I agree with Serhiy's comments in msg293394, but I couldn't find time to address his comments yet (plus we still need to backport the documentation update to 3.5 and 3.6 branches)
msg416578 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-04-02 18:57
Closing as the backport to 3.5/3.6 is no longer relevant and also cgitb is deprecated under 594.
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 74106
2022-04-02 18:57:18iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg416578

resolution: fixed
stage: resolved
2017-06-01 14:48:14berker.peksagsetmessages: + msg294949
2017-06-01 10:25:03serhiy.storchakasetmessages: + msg294929
versions: - Python 2.7, Python 3.5, Python 3.6
2017-06-01 09:51:31xmorelsetmessages: + msg294926
2017-05-10 09:24:52serhiy.storchakasetnosy: + serhiy.storchaka, martin.panter
messages: + msg293394
2017-05-10 08:52:34berker.peksagsetpull_requests: + pull_request1627
2017-05-10 08:50:47berker.peksagsetpull_requests: + pull_request1626
2017-05-05 08:15:14berker.peksagsetnosy: + berker.peksag
messages: + msg293072
2017-03-27 13:57:49xmorelsetpull_requests: - pull_request747
2017-03-27 13:57:38xmorelsetmessages: + msg290612
pull_requests: + pull_request748
2017-03-27 13:49:48Mariattasetversions: + Python 3.5
2017-03-27 13:16:48xmorelcreate