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

Document bytecode changes in 3.6 #72996

Closed
serhiy-storchaka opened this issue Nov 26, 2016 · 22 comments
Closed

Document bytecode changes in 3.6 #72996

serhiy-storchaka opened this issue Nov 26, 2016 · 22 comments
Assignees
Labels
3.7 docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Nov 26, 2016

BPO 28810
Nosy @brettcannon, @berkerpeksag, @serhiy-storchaka, @ilevkivskyi, @Mariatta, @MatthieuDartiailh
PRs
  • bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode added in 3.6 #239
  • bpo-28810: Document changes to CALL_FUNCTION opcodes #250
  • [3.6] bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode added in 3.6 #605
  • [3.6] bpo-28810: Document changes to CALL_FUNCTION opcodes #607
  • bpo-28810: Document remaining bytecode changes in 3.6 #651
  • bpo-28810: Update lnotab_notes.txt #665
  • bpo-28810: Document remaining bytecode changes in 3.6 (GH-651) #808
  • [3.6] bpo-28810: Update lnotab_notes.txt (GH-665) #919
  • Dependencies
  • bpo-26213: Document BUILD_*_UNPACK opcodes
  • Files
  • docs-call-function-opcodes.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 = 'https://github.com/brettcannon'
    closed_at = <Date 2017-03-24.21:32:35.326>
    created_at = <Date 2016-11-26.18:24:04.503>
    labels = ['type-feature', '3.7', 'docs']
    title = 'Document bytecode changes in 3.6'
    updated_at = <Date 2017-03-31.09:12:21.016>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-03-31.09:12:21.016>
    actor = 'Mariatta'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2017-03-24.21:32:35.326>
    closer = 'levkivskyi'
    components = ['Documentation']
    creation = <Date 2016-11-26.18:24:04.503>
    creator = 'serhiy.storchaka'
    dependencies = ['26213']
    files = ['45780']
    hgrepos = []
    issue_num = 28810
    keywords = ['patch']
    message_count = 22.0
    messages = ['281788', '281795', '281798', '282577', '286212', '286215', '288300', '288358', '289247', '289250', '289256', '289419', '290140', '290141', '290142', '290147', '290184', '290234', '290236', '290237', '290238', '290901']
    nosy_count = 7.0
    nosy_names = ['brett.cannon', 'docs@python', 'berker.peksag', 'serhiy.storchaka', 'levkivskyi', 'Mariatta', 'mdartiailh']
    pr_nums = ['239', '250', '605', '607', '651', '665', '808', '919']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28810'
    versions = ['Python 3.6', 'Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Nov 26, 2016

    There are many bytecode changes in 3.6, but seems most of them are not documented (besides short line in _bootstrap_external.py).

    • The bytecode now uses 16 bit units (wordcode) (bpo-26647).

    • Added FORMAT_VALUE opcode (bpo-25483).

    • Added BUILD_CONST_KEY_MAP opcode (bpo-27140).

    • Added BUILD_STRING opcode (bpo-27078).

    • Added BUILD_TUPLE_UNPACK_WITH_CALL opcode (bpo-28257).

    • Added SETUP_ANNOTATIONS and STORE_ANNOTATION opcodes (bpo-27985).

    • Changed CALL_FUNCTION, CALL_FUNCTION_KW and BUILD_MAP_UNPACK_WITH_CALL opcodes, removed CALL_FUNCTION_VAR, CALL_FUNCTION_VAR_KW opcodes, added CALL_FUNCTION_EX opcode (bpo-27213).

    • Changed MAKE_FUNCTION opcode, removed MAKE_CLOSURE opcode (bpo-27095).

    • Not related to the bytecode itself: lineno delta of code.co_lnotab now is signed (bpo-26107).

    There are third-party projects that need correct information about bytecode changes.

    @serhiy-storchaka serhiy-storchaka added 3.7 docs Documentation in the Doc dir type-feature A feature request or enhancement labels Nov 26, 2016
    @ilevkivskyi
    Copy link
    Member

    ilevkivskyi commented Nov 26, 2016

    SETUP_ANNOTATIONS and STORE_ANNOTATION opcodes are documented in documentation for dis module. Should they be documented also somewhere else?

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Nov 26, 2016

    I think only the mention in What's News is needed. Elvis already provided a patch in bpo-28635.

    But the documentation of other opcodes may be missed or outdated.

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Dec 6, 2016

    Because nobody proposed a patch, here is my attempt. Following patch documents opcodes CALL_FUNCTION, CALL_FUNCTION_KW and CALL_FUNCTION_EX.

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Jan 24, 2017

    Several third-party bytecode manipulating projects still are not updated to 3.6. Correct documentation is needed for them. Could anyone please make a review of the patch (or maybe totally rewrite it)?

    @brettcannon
    Copy link
    Member

    brettcannon commented Jan 24, 2017

    I'll review your patch sometime this week, Serhiy.

    @MatthieuDartiailh
    Copy link
    Mannequin

    MatthieuDartiailh mannequin commented Feb 21, 2017

    Anyone to review this. Working on bytecode manipulation for different projects I wish I had known this existed before.

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Feb 22, 2017

    Thank you for your patches Ivan. Feel free to rewrite my patch, I'm sure it uses poor English.

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Mar 8, 2017

    Ping.

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 8, 2017

    If the "ping" is for me, I spent my open source day last week reviewing the dependency for this issue (and other stuff) so I plan to get to this PR this Friday.

    @ilevkivskyi
    Copy link
    Member

    ilevkivskyi commented Mar 8, 2017

    It looks like there are still few things that are not covered in two open PRs. I will add these in an additional PR in the next few days.

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 10, 2017

    I have merged all the PRs that Ivan had open. I'll leave the issue open since Ivan said he had another PR he wanted to create.

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    New changeset 8f9e1bb by Brett Cannon (Ivan Levkivskyi) in branch 'master':
    bpo-28810: Document remaining bytecode changes in 3.6 (GH-651)
    8f9e1bb

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    New changeset 74bfcc3 by Brett Cannon in branch '3.6':
    bpo-28810: Document remaining bytecode changes in 3.6 (GH-651) (GH-808)
    74bfcc3

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    Is there anything left to do for this Ivan?

    @ilevkivskyi
    Copy link
    Member

    ilevkivskyi commented Mar 24, 2017

    Thanks Brett!

    I think this could be closed now.

    @serhiy-storchaka
    Copy link
    Member Author

    serhiy-storchaka commented Mar 24, 2017

    New changeset 9135275 by Serhiy Storchaka (Ivan Levkivskyi) in branch 'master':
    bpo-28810: Update lnotab_notes.txt (#665)
    9135275

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    New changeset 4807fa8 by Brett Cannon in branch '3.6':
    bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-607)
    4807fa8

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    New changeset 4b2a2a4 by Brett Cannon (Ivan Levkivskyi) in branch 'master':
    bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-250)
    4b2a2a4

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    New changeset 68c5e4c by Brett Cannon in branch '3.6':
    bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode (GH-605)
    68c5e4c

    @brettcannon
    Copy link
    Member

    brettcannon commented Mar 24, 2017

    New changeset 7e52c3e by Brett Cannon (Ivan Levkivskyi) in branch 'master':
    bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode added in 3.6 (GH-239)
    7e52c3e

    @Mariatta
    Copy link
    Sponsor Member

    Mariatta commented Mar 31, 2017

    New changeset 0a17e58 by Mariatta in branch '3.6':
    bpo-28810: Update lnotab_notes.txt (GH-665) (GH-919)
    0a17e58

    @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 docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants