classification
Title: Document bytecode changes in 3.6
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: 26213 Superseder:
Assigned To: brett.cannon Nosy List: Mariatta, berker.peksag, brett.cannon, docs@python, levkivskyi, mdartiailh, serhiy.storchaka
Priority: high Keywords: patch

Created on 2016-11-26 18:24 by serhiy.storchaka, last changed 2017-03-31 09:12 by Mariatta. This issue is now closed.

Files
File name Uploaded Description Edit
docs-call-function-opcodes.patch serhiy.storchaka, 2016-12-06 23:31 review
Pull Requests
URL Status Linked Edit
PR 239 merged levkivskyi, 2017-02-22 14:15
PR 250 merged levkivskyi, 2017-02-23 13:05
PR 605 merged brett.cannon, 2017-03-10 22:18
PR 607 merged brett.cannon, 2017-03-10 22:58
PR 651 merged levkivskyi, 2017-03-13 00:17
PR 665 merged levkivskyi, 2017-03-14 08:27
PR 808 merged brett.cannon, 2017-03-24 21:06
PR 919 merged Mariatta, 2017-03-31 05:26
Messages (22)
msg281788 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-26 18:24
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) (issue26647).

* Added FORMAT_VALUE opcode (issue25483).

* Added BUILD_CONST_KEY_MAP opcode (issue27140).

* Added BUILD_STRING opcode (issue27078).

* Added BUILD_TUPLE_UNPACK_WITH_CALL opcode (issue28257).

* Added SETUP_ANNOTATIONS and STORE_ANNOTATION opcodes (issue27985).

* 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 (issue27213).

* Changed MAKE_FUNCTION opcode, removed MAKE_CLOSURE opcode (issue27095).

* Not related to the bytecode itself: lineno delta of code.co_lnotab now is signed (issue26107).

There are third-party projects that need correct information about bytecode changes.
msg281795 - (view) Author: Ivan Levkivskyi (levkivskyi) * Date: 2016-11-26 19:48
SETUP_ANNOTATIONS and STORE_ANNOTATION opcodes are documented in documentation for dis module. Should they be documented also somewhere else?
msg281798 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-26 20:29
I think only the mention in What's News is needed. Elvis already provided a patch in issue28635.

But the documentation of other opcodes may be missed or outdated.
msg282577 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-06 23:31
Because nobody proposed a patch, here is my attempt. Following patch documents opcodes CALL_FUNCTION, CALL_FUNCTION_KW and CALL_FUNCTION_EX.
msg286212 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-01-24 19:58
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)?
msg286215 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-01-24 20:42
I'll review your patch sometime this week, Serhiy.
msg288300 - (view) Author: Matthieu Dartiailh (mdartiailh) * Date: 2017-02-21 13:36
Anyone to review this. Working on bytecode manipulation for different projects I wish I had known this existed before.
msg288358 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-02-22 14:23
Thank you for your patches Ivan. Feel free to rewrite my patch, I'm sure it uses poor English.
msg289247 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-08 17:31
Ping.
msg289250 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-08 18:19
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.
msg289256 - (view) Author: Ivan Levkivskyi (levkivskyi) * Date: 2017-03-08 20:47
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.
msg289419 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-10 23:09
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.
msg290140 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 21:05
New changeset 8f9e1bbf2dbdf46a0bf920279568a31460043376 by Brett Cannon (Ivan Levkivskyi) in branch 'master':
bpo-28810: Document remaining bytecode changes in 3.6 (GH-651)
https://github.com/python/cpython/commit/8f9e1bbf2dbdf46a0bf920279568a31460043376
msg290141 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 21:18
New changeset 74bfcc314b188e1e8c90e442270e36d6510755ee by Brett Cannon in branch '3.6':
bpo-28810: Document remaining bytecode changes in 3.6 (GH-651) (GH-808)
https://github.com/python/cpython/commit/74bfcc314b188e1e8c90e442270e36d6510755ee
msg290142 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 21:19
Is there anything left to do for this Ivan?
msg290147 - (view) Author: Ivan Levkivskyi (levkivskyi) * Date: 2017-03-24 21:32
Thanks Brett!

I think this could be closed now.
msg290184 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-24 22:19
New changeset 9135275cba680902e6caf29461f0423dc570190d by Serhiy Storchaka (Ivan Levkivskyi) in branch 'master':
bpo-28810: Update lnotab_notes.txt (#665)
https://github.com/python/cpython/commit/9135275cba680902e6caf29461f0423dc570190d
msg290234 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 22:28
New changeset 4807fa8386f825d0c71192c59f7e33b99a94bebe by Brett Cannon in branch '3.6':
bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-607)
https://github.com/python/cpython/commit/4807fa8386f825d0c71192c59f7e33b99a94bebe
msg290236 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 22:28
New changeset 4b2a2a425a906c8e4eb8daee14ab1793e225f726 by Brett Cannon (Ivan Levkivskyi) in branch 'master':
bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-250)
https://github.com/python/cpython/commit/4b2a2a425a906c8e4eb8daee14ab1793e225f726
msg290237 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 22:28
New changeset 68c5e4c592495f1e0f4f60acb3483beb6aa87be1 by Brett Cannon in branch '3.6':
bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode (GH-605)
https://github.com/python/cpython/commit/68c5e4c592495f1e0f4f60acb3483beb6aa87be1
msg290238 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 22:29
New changeset 7e52c3e7aefb4cdaa0662fc01ff68a5e976b77ca by Brett Cannon (Ivan Levkivskyi) in branch 'master':
bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode added in 3.6 (GH-239)
https://github.com/python/cpython/commit/7e52c3e7aefb4cdaa0662fc01ff68a5e976b77ca
msg290901 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2017-03-31 09:12
New changeset 0a17e584461b14ff65ec287048f53911dbb22222 by Mariatta in branch '3.6':
bpo-28810: Update lnotab_notes.txt (GH-665) (GH-919)
https://github.com/python/cpython/commit/0a17e584461b14ff65ec287048f53911dbb22222
History
Date User Action Args
2017-03-31 09:12:21Mariattasetnosy: + Mariatta
messages: + msg290901
2017-03-31 05:26:16Mariattasetpull_requests: + pull_request817
2017-03-24 22:29:10brett.cannonsetmessages: + msg290238
2017-03-24 22:28:57brett.cannonsetmessages: + msg290237
2017-03-24 22:28:50brett.cannonsetmessages: + msg290236
2017-03-24 22:28:35brett.cannonsetmessages: + msg290234
2017-03-24 22:19:36serhiy.storchakasetmessages: + msg290184
2017-03-24 21:32:35levkivskyisetstatus: open -> closed
resolution: fixed
messages: + msg290147

stage: patch review -> resolved
2017-03-24 21:19:30brett.cannonsetmessages: + msg290142
2017-03-24 21:18:56brett.cannonsetmessages: + msg290141
2017-03-24 21:06:17brett.cannonsetpull_requests: + pull_request713
2017-03-24 21:05:06brett.cannonsetmessages: + msg290140
2017-03-14 08:27:27levkivskyisetpull_requests: + pull_request547
2017-03-13 00:17:56levkivskyisetpull_requests: + pull_request538
2017-03-10 23:09:51brett.cannonsetmessages: + msg289419
2017-03-10 22:58:17brett.cannonsetpull_requests: + pull_request502
2017-03-10 22:18:51brett.cannonsetpull_requests: + pull_request500
2017-03-08 20:47:17levkivskyisetmessages: + msg289256
2017-03-08 18:19:47brett.cannonsetmessages: + msg289250
2017-03-08 17:31:31serhiy.storchakasetmessages: + msg289247
2017-02-23 13:05:43levkivskyisetpull_requests: + pull_request217
2017-02-22 14:23:29serhiy.storchakasetdependencies: + Document BUILD_*_UNPACK opcodes
messages: + msg288358
2017-02-22 14:15:21levkivskyisetpull_requests: + pull_request201
2017-02-21 13:36:11mdartiailhsetnosy: + mdartiailh
messages: + msg288300
2017-01-24 20:42:29brett.cannonsetmessages: + msg286215
2017-01-24 20:42:16brett.cannonsetassignee: docs@python -> brett.cannon
2017-01-24 19:58:44serhiy.storchakasetmessages: + msg286212
2016-12-07 16:57:00berker.peksagsetnosy: + berker.peksag
2016-12-06 23:31:12serhiy.storchakasetfiles: + docs-call-function-opcodes.patch
keywords: + patch
messages: + msg282577

stage: needs patch -> patch review
2016-11-27 21:31:06brett.cannonsetnosy: + brett.cannon
2016-11-26 20:29:35serhiy.storchakasetmessages: + msg281798
2016-11-26 19:48:14levkivskyisetnosy: + levkivskyi
messages: + msg281795
2016-11-26 18:24:04serhiy.storchakacreate