Skip to content

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

Description

@arhadthedev
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']

    Activity

    1. arhadthedev commented on Mar 8, 2022

      @arhadthedev
      MemberAuthor

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

    2. added
      docsDocumentation in the Doc dir
      3.11only security fixes
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      on Mar 8, 2022
    3. added
      type-bugAn unexpected behavior, bug, or error
      docsDocumentation in the Doc dir
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      on Mar 8, 2022
    4. transferred this issue fromon Apr 10, 2022
    5. added a commit that references this issue on Apr 18, 2022
    6. JelleZijlstra commented on Apr 18, 2022

      @JelleZijlstra
      Member

      Reopening until the backports are done.

    7. added 2 commits that reference this issue on Apr 18, 2022
    8. added 2 commits that reference this issue on Apr 19, 2022
    9. added a commit that references this issue on Jun 2, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.11only security fixesdocsDocumentation in the Doc dirextension-modulesC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions