dmontagu / fastapi-utils

Reusable utilities for FastAPI
MIT License
1.89k stars 165 forks source link

SQLAlchemy 2.0 Compatability #271

Open ZachMyers3 opened 1 year ago

ZachMyers3 commented 1 year ago

Hello!

Following the SQLA2.0 migration guide I walked through where SQLAlchemy was used in the codebase and it appears no changes were needed.

To further test this I install the latest version of SQLAlchemy (2.0.12 as of this request) and ran the test cases with no issues.

Something worth mentioning is conftest.py defines User with 1.14 column definitions rather than the future state of 2.0+. These are still accepted in the current version of SQLA2 so it currently raises no issues. I believe it's a good idea to keep them like this until future versions of SQLAlchemy force a change here.

Willing to do whatever else is needed to get this in, thanks for the great library!

For #270

lociko commented 1 year ago

Hi, I hope you are doing well! Is there any update?

ZachMyers3 commented 1 year ago

I've been running this branch of changes in a production environment with SQLA 2.0 since I created the MR to validate testing a bit. It's working as expected. Thanks for the project!

hassanj-576 commented 1 year ago

So, any chance of this getting merged ?

ameyarao98 commented 1 year ago

hello, can this be merged?

pavelzw commented 1 year ago

https://github.com/yuval9313/FastApi-RESTful is a more active fork of this repo that already has slqalchemy 2 support since 0.5.0 https://github.com/yuval9313/FastApi-RESTful/pull/202.