-
Notifications
You must be signed in to change notification settings - Fork 12
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
Unfreeze SQLAlchemy #252
Unfreeze SQLAlchemy #252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a risky change to me
@@ -6,4 +6,4 @@ toolz | |||
ruamel.yaml | |||
importlib_metadata | |||
pymysql | |||
sqlalchemy==1.3.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sqlalchemy 2 can be quite different from v.1, there is even a migration guide: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html
Just unfreezing like this seems risky..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I realised a little while ago. 😊 It was useful to test the dependencies at least: nice to see that chanjo-report / scout did build and run ok with this configuration. But chanjo would likely bug out without changes..
@@ -4,7 +4,7 @@ | |||
from datetime import datetime | |||
|
|||
import pytest | |||
from sqlite3 import IntegrityError | |||
from sqlalchemy.exc import IntegrityError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update the CHANGELOG. Then we could release a new version of chanjo perhaps?
Mm, yes, but this is only to 1.4 so far. If you dont mind I would like to enable move-to-2.0-warnings and see what gives. |
With SQLAlchemy 1.4 you can try creating a "future" engine, something that resembles SQLAlchemy 2. Perhaps this would help? --> https://docs.sqlalchemy.org/en/14/core/future.html |
Well, yes, I tested with
It gives a few, but it looks like only a few functions. I suspect the
|
Ah, no, this will be the most annoying, since its actually not in our codebase.. 😞
|
Ok, that was useful on some level I suppose. I'm now fairly convinced we will not be able to use Alchy (final version 2.2.2) with SQLAlchemy>=2. 1.4 seems ok if we wish to go through the hassle; it might help a little somewhere, but it is not going to take us to higher versions of e.g. Flask-SQLAlchemy that we would like. |
This PR adds | fixes:
How to prepare for test:
ssh
to ...bash servers/resources/SERVER.scilifelab.se/update-[THIS_TOOL]-stage.sh [THIS-BRANCH-NAME]
How to test:
Expected outcome:
Review:
This version is a: