sqlalchemy-stubs icon indicating copy to clipboard operation
sqlalchemy-stubs copied to clipboard

support for sqlalchemy version 1.4 and 2.0

Open GunpowderGuy opened this issue 5 years ago • 4 comments

Those versions will introduce massive api changes, will this package support them? If so, has work towards that started?

GunpowderGuy avatar Nov 08 '20 02:11 GunpowderGuy

I'm currently using this package with sqlalchemy 1.4; it's fairly usable. The only problems I've had so far is that some of the imports have changed, e.g. sqlalchemy.orm.exc.NoResultFound has moved to sqlalchemy.exc.NoResultFound. I believe this is the only place I've had to add an inline # type: ignore.

playfulpachyderm avatar Mar 01 '21 21:03 playfulpachyderm

sqlalchemy 1.4 added support for mypy. See the documentation

~~It's not yet released on pypi tough~~ cc @zzzeek

CaselIT avatar Mar 15 '21 09:03 CaselIT

It’s awesome that SQLAlchemy upstream is going to support mypy, but at present they don’t seem to have anything more than auto-generated stubs with everything annotated as Any or None, and a significant number of the None annotations being wrong. So sqlalchemy-stubs will continue to be needed for some time.

andersk avatar Mar 26 '21 01:03 andersk

Haven't had a chance to play yet but it does have a plug-in

ZanderBrown avatar Mar 26 '21 17:03 ZanderBrown