This works fine with asyncpgsa version 0.27.1 and sqlalchemy: 1.3.23, but fails when I upgrade to sqlalchemy 1.4.4.
import asyncpgsa
import sqlalchemy as sa
Thing = sa.Table("thing", sa.MetaData(), sa.Column("name", sa.Text))
query = Thing.insert().values(name="name").returning(Thing)
asyncpgsa.compile_query(query)
This prevents me from running any code that uses an INSERT statement.
The error seems to be here:
https://github.com/CanopyTax/asyncpgsa/blob/master/asyncpgsa/connection.py#L36
if isinstance(query.parameters, list):
because sqlalchemy.sql.dml.Insert no longer has a parameters attribute.
For now I'm dealing with this by pinning to an earlier sqlalchemy version. It's not clear to me what the fix should be, because the sqlalchemy internals seem to have changed considerably between versions.
This works fine with asyncpgsa version 0.27.1 and sqlalchemy: 1.3.23, but fails when I upgrade to sqlalchemy 1.4.4.
This prevents me from running any code that uses an INSERT statement.
The error seems to be here:
https://github.com/CanopyTax/asyncpgsa/blob/master/asyncpgsa/connection.py#L36
because
sqlalchemy.sql.dml.Insertno longer has aparametersattribute.For now I'm dealing with this by pinning to an earlier sqlalchemy version. It's not clear to me what the fix should be, because the sqlalchemy internals seem to have changed considerably between versions.