petl-developers / petl

Python Extract Transform and Load Tables of Data
MIT License
1.24k stars 193 forks source link

support for SQLAlchemy 2 #648

Open mhotzel opened 1 year ago

mhotzel commented 1 year ago

Problem description

At the moment, petl works with sqlalchemy 1.4. When I try to use it with sqlalchemy 2, "todb" doesn't work, because it seems so, that it checks the type of "dbo" by checking the existence of properties and methods, which do not all exists in sqlalchemy.Engine and sqlalchemy.Connection.

Change description

Describe the solution you'd like

I'm not experienced enough, to be save, but I would say, it would be good also to check against the dbo properties und methods in sqlalchemy 2

Advantages

It would work with sqlalchemy 2 too

Describe alternatives you've considered

I didn't have an idea, but to change to sqlalchemy 1.4