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

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

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

arhadthedev mannequin opened this issue Mar 8, 2022 · 2 comments · Fixed by #31769
Assignees
Labels
3.11 docs extension-modules interpreter-core type-bug

Comments

@arhadthedev
Copy link
Mannequin

@arhadthedev arhadthedev mannequin commented Mar 8, 2022

BPO 46962
Nosy @arhadthedev
PRs
  • #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
    Mannequin Author

    @arhadthedev arhadthedev mannequin commented Mar 8, 2022

    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 mannequin added the 3.11 label Mar 8, 2022
    @arhadthedev arhadthedev mannequin assigned docspython Mar 8, 2022
    @arhadthedev arhadthedev mannequin added docs 3.11 extension-modules interpreter-core labels Mar 8, 2022
    @arhadthedev arhadthedev mannequin assigned docspython Mar 8, 2022
    @arhadthedev arhadthedev mannequin added type-bug docs extension-modules interpreter-core 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

    @JelleZijlstra JelleZijlstra commented Apr 18, 2022

    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)
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 docs extension-modules interpreter-core type-bug
    Projects
    None yet
    Development

    Successfully merging a pull request may close this issue.

    1 participant