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

Fix docstrings that do not honor --without-doc-strings #91118

Closed
arhadthedev opened this issue Mar 8, 2022 · 2 comments · Fixed by #31769
Closed

Fix docstrings that do not honor --without-doc-strings #91118

arhadthedev opened this issue Mar 8, 2022 · 2 comments · Fixed by #31769
Assignees
Labels
3.11 only security fixes docs Documentation in the Doc dir extension-modules C modules in the Modules dir interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@arhadthedev
Copy link
Member

BPO 46962
Nosy @arhadthedev
PRs
  • gh-91118: Fix docstrings that do not honor --without-doc-strings #31769
  • 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 = None
    created_at = <Date 2022-03-08.18:59:44.544>
    labels = ['extension-modules', 'interpreter-core', '3.11', 'type-bug', 'docs']
    title = 'Fix docstrings that do not honor --without-doc-strings'
    updated_at = <Date 2022-03-08.19:01:28.471>
    user = 'https://github.com/arhadthedev'

    bugs.python.org fields:

    activity = <Date 2022-03-08.19:01:28.471>
    actor = 'arhadthedev'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation', 'Extension Modules', 'Interpreter Core']
    creation = <Date 2022-03-08.18:59:44.544>
    creator = 'arhadthedev'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46962
    keywords = ['patch']
    message_count = 1.0
    messages = ['414768']
    nosy_count = 2.0
    nosy_names = ['docs@python', 'arhadthedev']
    pr_nums = ['31769']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46962'
    versions = ['Python 3.11']

    @arhadthedev
    Copy link
    Member Author

    To support --without-doc-strings, all docstrings must be wrapped into PyDoc_STRVAR or PyDoc_STR (PEP-7). However, there are 18 occurrences in code and 10 in C API documentation that do not follow this rule. The documentation is important too because it should not teach people the wrong things.

    To find the occurrences I searched for (?:^\s*.tp_doc = "|" \/\* tp_doc \*\/$) and^(?:static\s+)?const\s+char\s+[^=]+=\s*".

    @arhadthedev arhadthedev added the 3.11 only security fixes label Mar 8, 2022
    @arhadthedev arhadthedev added docs Documentation in the Doc dir 3.11 only security fixes extension-modules C modules in the Modules dir interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Mar 8, 2022
    @arhadthedev arhadthedev added type-bug An unexpected behavior, bug, or error docs Documentation in the Doc dir extension-modules C modules in the Modules dir interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Mar 8, 2022
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    JelleZijlstra added a commit that referenced this issue Apr 18, 2022
    )
    
    Co-authored-by: Éric <merwok@netwok.org>
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    @JelleZijlstra
    Copy link
    Member

    Reopening until the backports are done.

    @JelleZijlstra JelleZijlstra reopened this Apr 18, 2022
    @JelleZijlstra JelleZijlstra self-assigned this Apr 18, 2022
    arhadthedev added a commit to arhadthedev/cpython that referenced this issue Apr 18, 2022
    …-strings (pythonGH-31769)
    
    Co-authored-by: Éric <merwok@netwok.org>
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    (cherry picked from commit a573cb2)
    
    Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
    arhadthedev added a commit to arhadthedev/cpython that referenced this issue Apr 18, 2022
    python#31769)
    
    Co-authored-by: Éric <merwok@netwok.org>
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    (cherry picked from commit a573cb2)
    JelleZijlstra pushed a commit that referenced this issue Apr 19, 2022
    GH-31769) (#91664)
    
    Co-authored-by: Éric <merwok@netwok.org>
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    (cherry picked from commit a573cb2)
    JelleZijlstra pushed a commit that referenced this issue Apr 19, 2022
    …gs (GH-31769) (#91662)
    
    Co-authored-by: Éric <merwok@netwok.org>
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    (cherry picked from commit a573cb2)
    
    Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
    hello-adam pushed a commit to hello-adam/cpython that referenced this issue Jun 2, 2022
    …strings (pythonGH-31769) (python#91664)
    
    Co-authored-by: Éric <merwok@netwok.org>
    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    (cherry picked from commit a573cb2)
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes docs Documentation in the Doc dir extension-modules C modules in the Modules dir interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    Successfully merging a pull request may close this issue.

    3 participants