ponyorm / pony

Pony Object Relational Mapper
Apache License 2.0
3.58k stars 242 forks source link

select - decompiling - errors #711

Open virajkanwade opened 2 months ago

virajkanwade commented 2 months ago

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
YuriFontella commented 2 months ago

use python 3.11