-
Notifications
You must be signed in to change notification settings - Fork 11
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
UPDATE: SQLAlchemy 2.0 #93
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
@choldgraf apologies for the ping - I saw that you were the reviewer for a similar PR about SQLAlchemy 1.4. Do you have an estimate for when someone can check this PR or create a different solution? Currently projects can't use myst-nb and SQLAlchemy 2. |
@chrisjsewell could we get eyes on this? Thank you |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #93 +/- ##
==========================================
- Coverage 83.32% 83.30% -0.02%
==========================================
Files 20 20
Lines 1355 1354 -1
==========================================
- Hits 1129 1128 -1
Misses 226 226
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
LGTM as long as the tests are happy 👍 . Does sqalchemy often make breaking changes at minor versions? If not, then why not pin it to <3.0
?
Thanks! Was just following the PR for supporting 1.4 where you mentioned preference for pinning to minor versions. I'm not sure if sqlalchemy had a history of making breaking changes at minor versions, but I think pinning to <3.0 should be fine. What do you think would be best? |
@choldgraf @chrisjsewell sorry for the ping again - I think it's important to resolve this quickly as it prevents projects that use myst-nb from using sqlalchemy 2.0. |
I'll try to take a look this weekend if I have a moment. In the meantime it'd be helpful if you made the modifications to the codebase to avoid the new warning that pops up. Not crucial but it'd be helpful since we'll need to do that at some point anyway |
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.
LGTM thanks! Appreciate the extra fix to get rid of the warning 👍
Thank you Chris! |
Updating
See https://github.com/bids-standard/pybids/actions/runs/4767649000/jobs/8476115124 It is unclear from the logs which version of SQLAlchemy we use. Most probably python3-sqlalchemy 1.4.31 which is bundled with Ubuntu 22.04. |
Ah i bet you're using old version of sqlalchemy. Given that sqlalchemy 2 is still less than a year old we should try to support both for a bit. We should have used a try/except block for the import instead of just changing it. If somebody wants to make a quick PR (@jzluo ?) Im happy to review and cut a quick patch release |
You're correct, from pybids/pyproject.toml:
Perhaps we should update. I'll look into why we need SQLAlchemy < 1.4.0. |
In the meantime, see PR #105 for compatibility with SQLAlchemy 1.3. |
We require SQLAlchemy < 1.4.0. However, jupyter_cache 0.6.0 relies on SQLAlchemy >= 1.4.0: executablebooks/jupyter-cache#93 Avoid pulling jupyter_cache 0.6.0 for now.
We require SQLAlchemy < 1.4.0. However, jupyter_cache 0.6.0 relies on SQLAlchemy >= 1.4.0: executablebooks/jupyter-cache#93 Avoid pulling jupyter_cache 0.6.0 for now.
With executablebooks/jupyter-cache#93 merged and `MyST-NB` updated, we can now support SQLAlchemy 2. Closes #1766
With executablebooks/jupyter-cache#93 merged and `MyST-NB` updated, we can now support SQLAlchemy 2. Closes #1766
With executablebooks/jupyter-cache#93 merged and `MyST-NB` updated, we can now support SQLAlchemy 2. Closes #1766
With executablebooks/jupyter-cache#93 merged and `MyST-NB` updated, we can now support SQLAlchemy 2. Closes langchain-ai#1766
With executablebooks/jupyter-cache#93 merged and `MyST-NB` updated, we can now support SQLAlchemy 2. Closes langchain-ai#1766
As mentioned in #92, SQLAlchemy is pinned to <1.5. All tests pass with SQLAlchemy 2.0.6 - the only SQLAlchemy warning is:
because of https://docs.sqlalchemy.org/en/20/changelog/migration_14.html#change-5508.
sqlalchemy.ext.declarative.declarative_base
is still present.