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

docs are missing info about module attributes #64019

Closed
ericsnowcurrently opened this issue Nov 28, 2013 · 7 comments
Closed

docs are missing info about module attributes #64019

ericsnowcurrently opened this issue Nov 28, 2013 · 7 comments
Labels
3.10 3.11 3.12 docs Documentation in the Doc dir easy type-feature A feature request or enhancement

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Nov 28, 2013

BPO 19820
Nosy @ericsnowcurrently, @eamanu, @MichaelAnckaert, @anilbey
PRs
  • bpo-19820: Updated documentation for inspect module: some module attributes were… #15359
  • 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 2013-11-28.06:42:20.974>
    labels = ['easy', '3.7', '3.8', '3.9', 'type-feature', 'docs']
    title = 'docs are missing info about module attributes'
    updated_at = <Date 2019-08-21.12:23:23.366>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2019-08-21.12:23:23.366>
    actor = 'michaelanckaert'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2013-11-28.06:42:20.974>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 19820
    keywords = ['patch', 'easy']
    message_count = 6.0
    messages = ['204642', '347930', '349712', '349718', '349727', '349735']
    nosy_count = 6.0
    nosy_names = ['Arfrever', 'docs@python', 'eric.snow', 'eamanu', 'michaelanckaert', 'anilbey']
    pr_nums = ['15359']
    priority = 'low'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue19820'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    Linked PRs

    @ericsnowcurrently
    Copy link
    Member Author

    ericsnowcurrently commented Nov 28, 2013

    The docs for the inspect module and the types module do not list all the import-related module attributes. I'm guessing they've been out of sync a while.

    The docstring for for inspect.ismodule() is likewise missing information.

    @ericsnowcurrently ericsnowcurrently added docs Documentation in the Doc dir type-feature A feature request or enhancement easy labels Nov 28, 2013
    @anilbey
    Copy link
    Mannequin

    anilbey mannequin commented Jul 14, 2019

    Are they still missing? inspect.ismodule() seems to be there at least.
    https://docs.python.org/3/library/inspect.html

    @MichaelAnckaert
    Copy link
    Mannequin

    MichaelAnckaert mannequin commented Aug 14, 2019

    As far as I can tell there is at least some information missing from the 'Types and members' section. Not all attributes are listed in the table.

    For example the attribute __cached__ is missing from the module type but it is documented in the inspect module.

    I can update the docs but I would rely on the comments in Lib/inspect.py on what to include. Executing inspect.getmembers on a module returns a lot more attributes than documented in ismodule.

    @ericsnowcurrently
    Copy link
    Member Author

    ericsnowcurrently commented Aug 14, 2019

    The relevant module attributes are described in the importlib docs: https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module

    @eamanu
    Copy link
    Mannequin

    eamanu mannequin commented Aug 14, 2019

    I can update the docs but I would rely on the comments in Lib/inspect.py on what to include. Executing inspect.getmembers on a module returns a lot more attributes than documented in ismodule.

    I can help too.

    @MichaelAnckaert
    Copy link
    Mannequin

    MichaelAnckaert mannequin commented Aug 14, 2019

    @emmanuel: thanks for offering your help.

    I made a first attempt at improving the docs in this branch: https://github.com/MichaelAnckaert/cpython/tree/bpo-19820

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    brettcannon pushed a commit that referenced this issue Nov 25, 2022
    …butes instead of listing them (GH-98116)
    
    Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
    miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 25, 2022
    … attributes instead of listing them (pythonGH-98116)
    
    (cherry picked from commit 7d2dcc5)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
    @brettcannon
    Copy link
    Member

    brettcannon commented Nov 25, 2022

    This is fixed in main, but the 3.11 backport failed.

    miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 25, 2022
    … attributes instead of listing them (pythonGH-98116)
    
    (cherry picked from commit 7d2dcc5)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
    miss-islington added a commit that referenced this issue Nov 25, 2022
    …butes instead of listing them (GH-98116)
    
    (cherry picked from commit 7d2dcc5)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 3.11 3.12 docs Documentation in the Doc dir easy type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants