From cf9161b6eda1a002a4d07a2264b5fecc617ca698 Mon Sep 17 00:00:00 2001
From: Christophe Monniez <moc@odoo.com>
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#98081
---
 odoo/tools/safe_eval.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py
index ce47edb9d0f1..ca21cc7210af 100644
--- a/odoo/tools/safe_eval.py
+++ b/odoo/tools/safe_eval.py
@@ -89,6 +89,7 @@ _EXPR_OPCODES = _CONST_OPCODES.union(to_opcodes([
 ])) - _BLACKLIST
 
 _SAFE_OPCODES = _EXPR_OPCODES.union(to_opcodes([
+    'GEN_START',  # added in 3.10
     'POP_BLOCK', 'POP_EXCEPT',
 
     # note: removed in 3.8
-- 
GitLab