Meta icon indicating copy to clipboard operation
Meta copied to clipboard

Pypi.org example gives 'key-error' on Python3.12

Open brobr opened this issue 1 year ago • 0 comments

see https://github.com/leo-editor/leo-editor/issues/4229

this can be patched with:

diff -Naur meta-1.0.2/meta/decompiler/control_flow_instructions.py meta-1.0.2b/meta/decompiler/control_flow_instructions.py
--- meta-1.0.2/meta/decompiler/control_flow_instructions.py	2018-08-15 08:23:03.000000000 +0100
+++ meta-1.0.2b/meta/decompiler/control_flow_instructions.py	2024-12-03 17:04:15.649881636 +0000
@@ -9,8 +9,8 @@
 from meta.bytecodetools.instruction import Instruction
 from meta.asttools.visitors.print_visitor import print_ast
 from meta.utils import py3op, py2op, py3
-AND_JUMPS = ['JUMP_IF_FALSE_OR_POP', 'POP_JUMP_IF_FALSE']
-OR_JUMPS = ['JUMP_IF_TRUE_OR_POP', 'POP_JUMP_IF_TRUE']
+AND_JUMPS = ['POP_JUMP_IF_FALSE']
+OR_JUMPS = ['POP_JUMP_IF_TRUE']
 JUMPS = AND_JUMPS + OR_JUMPS
 JUMP_OPS = [opcode.opmap[name] for name in JUMPS]

brobr avatar Dec 03 '24 17:12 brobr