Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document cgitb.text and cgitb.html #74106

Closed
masklinn mannequin opened this issue Mar 27, 2017 · 8 comments
Closed

Document cgitb.text and cgitb.html #74106

masklinn mannequin opened this issue Mar 27, 2017 · 8 comments
Labels
3.7 (EOL) end of life docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@masklinn
Copy link
Mannequin

masklinn mannequin commented Mar 27, 2017

BPO 29920
Nosy @masklinn, @berkerpeksag, @vadmium, @serhiy-storchaka, @iritkatriel
PRs
  • bpo-29920: Document cgitb.text and cgitb.html #849
  • [3.6] bpo-29920: Document cgitb.text() and cgitb.html() functions (GH-849) #1527
  • [3.5] bpo-29920: Document cgitb.text() and cgitb.html() functions (GH-849) #1528
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2022-04-02.18:57:18.192>
    created_at = <Date 2017-03-27.13:16:48.967>
    labels = ['type-feature', '3.7', 'docs']
    title = 'Document cgitb.text and cgitb.html'
    updated_at = <Date 2022-04-02.18:57:18.191>
    user = 'https://github.com/masklinn'

    bugs.python.org fields:

    activity = <Date 2022-04-02.18:57:18.191>
    actor = 'iritkatriel'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2022-04-02.18:57:18.192>
    closer = 'iritkatriel'
    components = ['Documentation']
    creation = <Date 2017-03-27.13:16:48.967>
    creator = 'xmorel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29920
    keywords = []
    message_count = 8.0
    messages = ['290608', '290612', '293072', '293394', '294926', '294929', '294949', '416578']
    nosy_count = 6.0
    nosy_names = ['xmorel', 'docs@python', 'berker.peksag', 'martin.panter', 'serhiy.storchaka', 'iritkatriel']
    pr_nums = ['849', '1527', '1528']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue29920'
    versions = ['Python 3.7']

    @masklinn
    Copy link
    Mannequin Author

    masklinn mannequin commented Mar 27, 2017

    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).

    @masklinn masklinn mannequin added the 3.7 (EOL) end of life label Mar 27, 2017
    @masklinn masklinn mannequin assigned docspython Mar 27, 2017
    @masklinn masklinn mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Mar 27, 2017
    @masklinn
    Copy link
    Mannequin Author

    masklinn mannequin commented Mar 27, 2017

    PR targetted to master rather than 2.7

    @berkerpeksag
    Copy link
    Member

    New changeset c07b3a1 by Berker Peksag (masklinn) in branch 'master':
    bpo-29920: Document cgitb.text() and cgitb.html() functions (GH-849)
    c07b3a1

    @serhiy-storchaka
    Copy link
    Member

    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".

    @masklinn
    Copy link
    Mannequin Author

    masklinn mannequin commented Jun 1, 2017

    Should I close this since the PR was merged?

    @serhiy-storchaka
    Copy link
    Member

    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.

    @berkerpeksag
    Copy link
    Member

    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)

    @iritkatriel
    Copy link
    Member

    Closing as the backport to 3.5/3.6 is no longer relevant and also cgitb is deprecated under 594.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants