Fix incorrect versions in magic number comments#101301
Merged
brandtbucher merged 1 commit intopython:mainfrom Jan 25, 2023
Merged
Fix incorrect versions in magic number comments#101301brandtbucher merged 1 commit intopython:mainfrom
brandtbucher merged 1 commit intopython:mainfrom
Conversation
mdboom
pushed a commit
to mdboom/cpython
that referenced
this pull request
Jan 31, 2023
mwath
added a commit
to odoo-dev/odoo
that referenced
this pull request
Feb 16, 2026
This commits removes legacy opcodes from safe_eval and qweb that are not used
in Python 3.12 and above. Since Odoo now requires Python 3.12 to run,
maintaining these opcodes is unnecessary. This change reduces the number
of opcodes to review during pentests and simplifies the codebase.
The following opcodes were removed:
- bpo-17611: removes `BREAK_LOOP`, `CONTINUE_LOOP`, `SETUP_LOOP`,
`SETUP_EXCEPT`. (Python 3.8a1 3400)
- bpo-33387: removes `BEGIN_FINALLY`, `END_FINALLY`, `CALL_FINALLY`,
`POP_FINALLY`. (Python 3.9a0 3422)
- bpo-45636: replaces `BINARY_*`/`INPLACE_*` with `BINARY_OP`.
(Python 3.11a3 3464)
- bpo-44525: removes `CALL_FUNCTION`, `CALL_FUNCTION_KW`,
`CALL_METHOD`. (Python 3.11a4 3467)
- bpo-46009: replaces `GEN_START` with `POP_TOP`. (Python 3.11a4 3472)
- bpo-46528: replaces `DUP_TOP{,_TWO}` with `COPY` and
`ROT_{TWO,THREE,FOUR,N}` with `SWAP`. (Python 3.11a5 3477)
- bpo-47120: removes `JUMP_ABSOLUTE`. (Python 3.11a6 3489)
- bpo-47186: removes `JUMP_IF_NOT_EXC_MATCH`. (Python 3.11a6 3490)
- [odooGH-90690]: removes `PRECALL`. (Python 3.12a1 3500)
- [odooGH-93554]: removes `POP_JUMP_{FOR,BACK}WARD_IF_{TRUE,FALSE,NONE,NOT_NONE}`.
(Python 3.12a1 3509)
- [odooGH-101301]: removes `UNARY_POSITIVE`. (Python 3.12a4 3514)
- [odooGH-89987]: removes `JUMP_IF_{FALSE,TRUE}_OR_POP`. (Python 3.12a7 3522)
Note: removed `RESUME` and `SWAP` from `_SAFE_QWEB_OPCODES`, as it was
already included in `_EXPR_OPCODES`.
[odooGH-89987]: python/cpython#89987
[odooGH-90690]: python/cpython#90690
[odooGH-93554]: python/cpython#93554
[odooGH-101301]: python/cpython#101301
mwath
added a commit
to odoo-dev/odoo
that referenced
this pull request
Feb 17, 2026
This commits removes legacy opcodes from safe_eval and qweb that are not used
in Python 3.12 and above. Since Odoo now requires Python 3.12 to run,
maintaining these opcodes is unnecessary. This change reduces the number
of opcodes to review during pentests and simplifies the codebase.
The following opcodes were removed:
- bpo-17611: removes `BREAK_LOOP`, `CONTINUE_LOOP`, `SETUP_LOOP`,
`SETUP_EXCEPT`. (Python 3.8a1 3400)
- bpo-33387: removes `BEGIN_FINALLY`, `END_FINALLY`, `CALL_FINALLY`,
`POP_FINALLY`. (Python 3.9a0 3422)
- bpo-45636: replaces `BINARY_*`/`INPLACE_*` with `BINARY_OP`.
(Python 3.11a3 3464)
- bpo-44525: removes `CALL_FUNCTION`, `CALL_FUNCTION_KW`,
`CALL_METHOD`. (Python 3.11a4 3467)
- bpo-46009: replaces `GEN_START` with `POP_TOP`. (Python 3.11a4 3472)
- bpo-46528: replaces `DUP_TOP{,_TWO}` with `COPY` and
`ROT_{TWO,THREE,FOUR,N}` with `SWAP`. (Python 3.11a5 3477)
- bpo-47120: removes `JUMP_ABSOLUTE`. (Python 3.11a6 3489)
- bpo-47186: removes `JUMP_IF_NOT_EXC_MATCH`. (Python 3.11a6 3490)
- [odooGH-90690]: removes `PRECALL`. (Python 3.12a1 3500)
- [odooGH-93554]: removes `POP_JUMP_{FOR,BACK}WARD_IF_{TRUE,FALSE,NONE,NOT_NONE}`.
(Python 3.12a1 3509)
- [odooGH-101301]: removes `UNARY_POSITIVE`. (Python 3.12a4 3514)
- [odooGH-89987]: removes `JUMP_IF_{FALSE,TRUE}_OR_POP`. (Python 3.12a7 3522)
Note: removed `RESUME` and `SWAP` from `_SAFE_QWEB_OPCODES`, as it was
already included in `_EXPR_OPCODES`.
[odooGH-89987]: python/cpython#89987
[odooGH-90690]: python/cpython#90690
[odooGH-93554]: python/cpython#93554
[odooGH-101301]: python/cpython#101301
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.