[issue29920] Document cgitb.text and cgitb.html
New submission from Xavier Morel: 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). ---------- assignee: docs@python components: Documentation messages: 290608 nosy: docs@python, xmorel priority: normal pull_requests: 747 severity: normal status: open title: Document cgitb.text and cgitb.html type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- versions: +Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Xavier Morel added the comment: PR targetted to master rather than 2.7 ---------- pull_requests: +748 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Changes by Xavier Morel <xavier.morel@masklinn.net>: ---------- pull_requests: -747 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Berker Peksag added the comment: 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/c07b3a15be5e0a68a73b4c532861ed8de69... ---------- nosy: +berker.peksag _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Changes by Berker Peksag <berker.peksag@gmail.com>: ---------- pull_requests: +1626 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Changes by Berker Peksag <berker.peksag@gmail.com>: ---------- pull_requests: +1627 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Serhiy Storchaka added the comment: 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". ---------- nosy: +martin.panter, serhiy.storchaka _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Xavier Morel added the comment: Should I close this since the PR was merged? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Serhiy Storchaka added the comment: 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. ---------- versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
Berker Peksag added the comment: 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) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29920> _______________________________________
participants (4)
-
Berker Peksag -
Mariatta Wijaya -
Serhiy Storchaka -
Xavier Morel