Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SQLAlchemy 2.0.x #160

Merged
merged 6 commits into from
Jan 9, 2024
Merged

Support SQLAlchemy 2.0.x #160

merged 6 commits into from
Jan 9, 2024

Conversation

Ahmad-Wahid
Copy link
Contributor

@Ahmad-Wahid Ahmad-Wahid commented Dec 27, 2023

In this pull request, I've advanced the SQLAlchemy version from 1.3.19 to 2.0.0 and adjusted the queries to adhere to the 2.0.x format. I have used pytest to test all the new changes.

References:

@Ahmad-Wahid Ahmad-Wahid added the dependencies Pull requests that update a dependency file label Dec 27, 2023
@Ahmad-Wahid Ahmad-Wahid self-assigned this Dec 27, 2023
@Flix6x
Copy link
Collaborator

Flix6x commented Dec 28, 2023

Great work!

I noticed that this PR constitutes a breaking change, as timely-beliefs will effectively require SQLAlchemy>=2. We can make that explicit in the pyproject.toml.

But before we do so, I want to ask @nhoening whether we'd need to (or prefer to) support both major versions for a while? My thought is that we'd accept breaking support for SQLAlchemy<2, and release as timely-beliefs==2. Then pip's dependency resolver should pick up on any compatibility issues. And if needed, we can always backport new tb features to the 1.x branch.

@nhoening
Copy link
Contributor

I agree with the plan.

It is not a classic breaking change, unless someone needs to use SQLAlchemy<2 for some reason.

Nevertheless, a good time to move TB to v2

@Flix6x Flix6x added this to the 2.0.0 milestone Dec 28, 2023
@Ahmad-Wahid
Copy link
Contributor Author

I would want to test this when flexmeasures support sqlalchemy==2.0 to see how fast the data is going to be loaded.

@Flix6x
Copy link
Collaborator

Flix6x commented Dec 28, 2023

Locally I didn't notice much of a difference, but let me know if you need anything from me to do this test properly (such as a dev release).

@Flix6x Flix6x merged commit 53f6793 into main Jan 9, 2024
5 checks passed
@Flix6x Flix6x deleted the issue-159-Support_SQLAlchemy_2_0 branch January 9, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants