From f629cf5feee3e77ed6b9316cc7fbd217420d7a9e Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Thu, 14 Apr 2022 08:08:06 +0000 Subject: [PATCH] [FIX] safe_eval: add new py 3.10 GEN_START opcode Part-of: odoo/odoo#91927 --- odoo/tools/safe_eval.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py index 59f3617d359..02c0b31423b 100644 --- a/odoo/tools/safe_eval.py +++ b/odoo/tools/safe_eval.py @@ -86,6 +86,8 @@ _EXPR_OPCODES = _CONST_OPCODES.union(to_opcodes([ # specialised comparisons 'IS_OP', 'CONTAINS_OP', 'DICT_MERGE', 'DICT_UPDATE', + # Basically used in any "generator literal" + 'GEN_START', # added in 3.10 but already removed from 3.11. ])) - _BLACKLIST _SAFE_OPCODES = _EXPR_OPCODES.union(to_opcodes([