pony icon indicating copy to clipboard operation
pony copied to clipboard

select - decompiling - errors

Open mavwolverine opened this issue 10 months ago • 1 comments

Python 3.12 pony 0.7.17

I ran the estore.py sample https://github.com/ponyorm/pony/blob/orm/pony/orm/examples/estore.py

result = select(c for c in Customer if c.country == 'USA')[:]

.venv/lib/python3.12/site-packages/pony/orm/decompiling.py", line 218, in get_instructions
    arg = [cmp_op[oparg]]
           ~~~~~~^^^^^^^
IndexError: tuple index out of range

Also

result = select((c.country, count(c)) for c in Customer)[:]

.venv/lib/python3.12/site-packages/pony/orm/decompiling.py", line 278, in decompile
    x = method(*arg)
        ^^^^^^^^^^^^
TypeError: Decompiler.YIELD_VALUE() takes 1 positional argument but 2 were given

mavwolverine avatar Apr 12 '24 00:04 mavwolverine

use python 3.11

YuriFontella avatar Apr 15 '24 00:04 YuriFontella