Skip to content

Fix incorrect versions in magic number comments#101301

Merged
brandtbucher merged 1 commit intopython:mainfrom
brandtbucher:magic-numbers
Jan 25, 2023
Merged

Fix incorrect versions in magic number comments#101301
brandtbucher merged 1 commit intopython:mainfrom
brandtbucher:magic-numbers

Conversation

@brandtbucher
Copy link
Member

No description provided.

@brandtbucher brandtbucher self-assigned this Jan 24, 2023
@brandtbucher brandtbucher merged commit 6162a0e into python:main Jan 25, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments