You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bytecode changes in 3.14 are not documented in dis module docs #135447
However, many of the new bytecode instructions added in 3.14 (BUILD_INTERPOLATION, NOT_TAKEN, etc) are missing from the 3.14 module docs. Some changes to existing instructions like CALL_FUNCTION_EX are also undocumented.
BUILD_TEMPLATE
BUILD_INTERPOLATION
NOT_TAKEN
POP_ITER
CALL_FUNCTION_EX (changed)
Remove BINARY_SUBSCR
Based on pycore_magic_number.h, it appears all changes after Python 3.14a2 with magic number 3609 are undocumented. Changes before this, like the addition of LOAD_SMALL_INT are correctly documented.
The description is not accurate, LOAD_SMALL_INT is documented:
You are correct. It appears that some of the older 3.14 bytecodes are documented. Based on pycore_magic_number.h, LOAD_SMALL_INT was added in Python 3.14a2 with magic number 3609. Changes before this are documented, and changes to the bytecode after this are undocumented. I have updated the main comment with this fact and other bytecode changes.
Anyone know how CALL_FUNCTION_EX was changed, flags could be None?
Based on pycore_magic_number.h, I think the flag for has_kwargs has been dropped.
The description is not accurate, LOAD_SMALL_INT is documented:
You are correct. It appears that some of the older 3.14 bytecodes are documented. Based on pycore_magic_number.h, LOAD_SMALL_INT was added in Python 3.14a2 with magic number 3609. Changes before this are documented, and changes to the bytecode after this are undocumented. I have updated the main comment with this fact and other bytecode changes.
Great!
Anyone know how CALL_FUNCTION_EX was changed, flags could be None?
Based on pycore_magic_number.h, I think the flag for has_kwargs has been dropped.
@Techcable can you update the issue, to note that BINARY_SUBSCR functionality is now part of BINARY_OP and also that BEFORE_WITH and BEFORE_ASYNC_WITH were removed and replaced by LOAD_SPECIAL?
I am contributing support for newer python versions to a project that analyzes ops (to generate an ast to generate SQL) and missing documentation is really problematic.
Two more missing pieces of documentation I found, that were both introduced back in 3.13 already:
LOAD_GLOBAL/LOAD_ATTR/CALL/... have the two elements on the stack swapped (the self/null and the e.g. callable)
need to use protected _varname_from_oparg instead of public co_varnames, not mentioned e.g. here
Activity
esc commentedon Jun 24, 2025
Can you add
POP_ITER:#128445 (comment)
it seems to be missing too.
esc commentedon Jun 24, 2025
The description is not accurate,
LOAD_SMALL_INTis documented:esc commentedon Jun 24, 2025
Anyone know how
CALL_FUNCTION_EXwas changed,flagscould beNone?Techcable commentedon Jun 25, 2025
Added
You are correct. It appears that some of the older 3.14 bytecodes are documented. Based on pycore_magic_number.h,
LOAD_SMALL_INTwas added in Python 3.14a2 with magic number 3609. Changes before this are documented, and changes to the bytecode after this are undocumented. I have updated the main comment with this fact and other bytecode changes.esc commentedon Jun 26, 2025
Great!
Great!
Yeah, that sounds correctish. I also found:
https://github.com/python/cpython/pull/129226/files
and that states:
esc commentedon Jun 26, 2025
FWIW: this is the PR that introduced
POP_ITER: #128445esc commentedon Jul 1, 2025
@Techcable can you update the issue, to note that
BINARY_SUBSCRfunctionality is now part ofBINARY_OPand also thatBEFORE_WITHandBEFORE_ASYNC_WITHwere removed and replaced byLOAD_SPECIAL?black-sliver commentedon Aug 22, 2025
+1
I am contributing support for newer python versions to a project that analyzes ops (to generate an ast to generate SQL) and missing documentation is really problematic.
Two more missing pieces of documentation I found, that were both introduced back in 3.13 already:
_varname_from_oparginstead of publicco_varnames, not mentioned e.g. hereShould I open a separate issue for those?
gh-135447: Document the ``NOT_TAKEN`` & ``POP_ITER`` bytecode instruc…
pythongh-135447: Document the ``NOT_TAKEN`` & ``POP_ITER`` bytecode i…
[3.14] gh-135447: Document the ``NOT_TAKEN`` & ``POP_ITER`` bytecode …