Repository navigation
Bytecode changes in 3.14 are not documented in dis module docs #135447
Description
Activity
- marked Python 3.14: undocumented opcodes #135628 as a duplicate of this issue
on Jun 17, 2025 - addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.14bugs and security fixesbugs and security fixes
on Jun 19, 2025 Anyone know how
CALL_FUNCTION_EXwas changed,flagscould beNone?Can you add POP_ITER:
Added
The description is not accurate,
LOAD_SMALL_INTis documented: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.Anyone know how CALL_FUNCTION_EX was changed, flags could be None?
Based onpycore_magic_number.h, I think the flag forhas_kwargshas been dropped.Can you add POP_ITER:
Added
Great!
The description is not accurate,
LOAD_SMALL_INTis documented: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.Great!
Anyone know how CALL_FUNCTION_EX was changed, flags could be None?
Based onpycore_magic_number.h, I think the flag forhas_kwargshas been dropped.Yeah, that sounds correctish. I also found:
https://github.com/python/cpython/pull/129226/files
and that states:
Python 3.14a5 3615 (CALL_FUNCTION_EX always take a kwargs argument)Can you add POP_ITER:
Added
Great!
FWIW: this is the PR that introduced
POP_ITER: #128445@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?+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:
- 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_oparginstead of publicco_varnames, not mentioned e.g. here
Should I open a separate issue for those?
- added a commit that references this issue
on Sep 28, 2025 - added a commit that references this issue
on Sep 28, 2025
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo

Documentation
The module documentation for
disnormally contains documentation for all non-specialized bytecode instructions.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 likeCALL_FUNCTION_EXare also undocumented.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_INTare correctly documented.Linked PRs
NOT_TAKEN&POP_ITERbytecode instructions #135803NOT_TAKEN&POP_ITERbytecode instructions (GH-135803) #139399