[FIX] safe_eval: 3.11 compatibility
Complement on 1e35315399 (#112450):
alongside the split between forwards and backwards jump we missed that
3.11 has a specialized version of each for the `is None` and `is not
None` cases. A use of that was added in standard in 16.5 (#120446) but
more generally it makes sense that server actions would support
conditional tests against `None`, probably...
closes odoo/odoo#137099
X-original-commit: 3227ae45fb79cd08a102aecb484e4f0a4f2597c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
@@ -127,6 +127,9 @@ _SAFE_OPCODES = _EXPR_OPCODES.union(to_opcodes([
|
||||
# replacement of POP_JUMP_IF_TRUE and POP_JUMP_IF_FALSE
|
||||
'POP_JUMP_FORWARD_IF_FALSE', 'POP_JUMP_FORWARD_IF_TRUE',
|
||||
'POP_JUMP_BACKWARD_IF_FALSE', 'POP_JUMP_BACKWARD_IF_TRUE',
|
||||
# special case of the previous for IS NONE / IS NOT NONE
|
||||
'POP_JUMP_FORWARD_IF_NONE', 'POP_JUMP_BACKWARD_IF_NONE',
|
||||
'POP_JUMP_FORWARD_IF_NOT_NONE', 'POP_JUMP_BACKWARD_IF_NOT_NONE',
|
||||
#replacement of JUMP_ABSOLUTE
|
||||
'JUMP_BACKWARD',
|
||||
#replacement of JUMP_IF_NOT_EXC_MATCH
|
||||
|
||||
Reference in New Issue
Block a user