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

Information about CodeType in inspect documentation is outdated #71172

Closed
zhangyangyu opened this issue May 9, 2016 · 9 comments
Closed

Information about CodeType in inspect documentation is outdated #71172

zhangyangyu opened this issue May 9, 2016 · 9 comments
Labels
3.7 (EOL) end of life docs Documentation in the Doc dir

Comments

@zhangyangyu
Copy link
Member

BPO 26985
Nosy @berkerpeksag, @zhangyangyu
PRs
  • bpo-26985: Add missing info of code object in inspect documentation #1090
  • [3.6] bpo-26985: Add missing info of code object in inspect documentation #1099
  • [3.5] bpo-26985: Add missing info of code object in inspect documentation #1100
  • Files
  • inspect_doc.patch
  • 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 2017-04-13.03:38:14.900>
    created_at = <Date 2016-05-09.14:11:42.209>
    labels = ['3.7', 'docs']
    title = 'Information about CodeType in inspect documentation is outdated'
    updated_at = <Date 2017-04-13.03:38:14.899>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2017-04-13.03:38:14.899>
    actor = 'xiang.zhang'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2017-04-13.03:38:14.900>
    closer = 'xiang.zhang'
    components = ['Documentation']
    creation = <Date 2016-05-09.14:11:42.209>
    creator = 'xiang.zhang'
    dependencies = []
    files = ['42793']
    hgrepos = []
    issue_num = 26985
    keywords = ['patch']
    message_count = 9.0
    messages = ['265197', '265222', '267841', '268030', '268033', '268672', '291581', '291586', '291588']
    nosy_count = 3.0
    nosy_names = ['docs@python', 'berker.peksag', 'xiang.zhang']
    pr_nums = ['1090', '1099', '1100']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue26985'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    Information about CodeType in inspect documentation is outdated. It lacks attributes: co_kwonlyargcount, co_freevars, co_cellvars. And co_flags lacks many more options. These also apply to the comments of inspect.iscode source code.

    @zhangyangyu zhangyangyu added the docs Documentation in the Doc dir label May 9, 2016
    @zhangyangyu
    Copy link
    Member Author

    Attach patch.

    @berkerpeksag
    Copy link
    Member

    I prefer to not duplicate the list in Lib/inspect.py. We did similar docstring cleanups in several modules (venv for example) recently.

    @berkerpeksag berkerpeksag added the type-bug An unexpected behavior, bug, or error label Jun 8, 2016
    @zhangyangyu
    Copy link
    Member Author

    So maybe remove the docstring entirely?

    @berkerpeksag
    Copy link
    Member

    "Return true if the object is a code object." should stay. We can add a short sentence to refer people to the inspect documentation for the list of co_* attributes.

    @zhangyangyu
    Copy link
    Member Author

    Hmm, when I am going to delete the list in the docstring, I find other functions get lists too in inspect.py. So maybe we should open another issue to clean them after first merging this thread?

    @zhangyangyu zhangyangyu added 3.7 (EOL) end of life and removed type-bug An unexpected behavior, bug, or error labels Apr 12, 2017
    @zhangyangyu
    Copy link
    Member Author

    New changeset a6902e6 by Xiang Zhang in branch 'master':
    bpo-26985: Add missing info of code object in inspect documentation (GH-1090)
    a6902e6

    @zhangyangyu
    Copy link
    Member Author

    New changeset 14944c6 by Xiang Zhang in branch '3.6':
    bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1099)
    14944c6

    @zhangyangyu
    Copy link
    Member Author

    New changeset 72b1d41 by Xiang Zhang in branch '3.5':
    bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1100)
    72b1d41

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants