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

⬆ Upgrade constrain for SQLAlchemy = ">=1.4.17,<=1.4.41" #371

Merged
merged 3 commits into from
Aug 27, 2022

Conversation

RobertRosca
Copy link
Contributor

SQLAlchemy changes in versions greater than 1.4.35 break relationships and break even the examples in the docs, the latest working version seems to be 1.4.35.

This has been the cause of at least two issues (#255, #315) but probably more.

The breaking change wasn't picked up by dependabot because the current constraint of <1.5.0 does not register any releases under 1.5.0 as 'new' since the version constraint does not have to be bumped up for it. By limiting it to <= dependabot will start bumping up the upper end of the constraints.

PR #322 fixes this with a simple code change but hasn't been merged yet, the constraint range change should still be made so that dependabot will automatically create PRs and run tests on newer versions of SQLAlchemy.

@ajlive
Copy link

ajlive commented Jun 29, 2022

Since sqlmodel has been broken since, I guess, May (?) with this PR unmerged since May, should I assume sqlmodel is unmaintained? Not a gripe at all, just trying it out and wondering if the project still active.

@byrman
Copy link
Contributor

byrman commented Jun 29, 2022

This has been the cause of at least two issues (#255, #315) but probably more.

Note that #255 was opened on Feb 28, while SQLAlchemy 1.4.36 was released on Apr 6, 2022.

@RobertRosca
Copy link
Contributor Author

Since sqlmodel has been broken since, I guess, May (?) with this PR unmerged since May, should I assume sqlmodel is unmaintained? Not a gripe at all, just trying it out and wondering if the project still active.

I think @tiangolo is just pretty busy right now. The rate of new issues and PRs is pretty high so it's easy to miss something like this, especially if you're relying on dependabot to test and flag these kind of issues. Changing the constraint from < to <= should help a bit since it'll bump up the version and run the tests for new SQLAlchemy versions in the future.

@RobertRosca
Copy link
Contributor Author

This has been the cause of at least two issues (#255, #315) but probably more.

Note that #255 was opened on Feb 28, while SQLAlchemy 1.4.36 was released on Apr 6, 2022.

Aha, interesting, to be honest I was lazy and just searched for 1.4.35 and assumed that any issue where people said installing that version fixed the problem was related to this. This comment #255 (comment) mentioned that pinning the version to <=1.4.35 fixed the problem so it seemed related, but yeah based on the dates that doesn't make sense 🤔

@ajlive
Copy link

ajlive commented Jul 5, 2022

Thanks @RobertRosca! Good to know it's still active.

@cisaacstern
Copy link

+1 for this PR so that, as @RobertRosca observes, dependabot can more easily track this issue.

@tiangolo tiangolo changed the title Constrain SQLAlchemy to <=1.4.35 ⬆ Upgrade constrain for SQLAlchemy = ">=1.4.17,<=1.4.41" Aug 27, 2022
@codecov
Copy link

codecov bot commented Aug 27, 2022

Codecov Report

Merging #371 (de4ccdb) into main (ea18162) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #371   +/-   ##
=======================================
  Coverage   97.49%   97.49%           
=======================================
  Files         181      181           
  Lines        6038     6038           
=======================================
  Hits         5887     5887           
  Misses        151      151           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

📝 Docs preview for commit de4ccdb at: https://630a5ffdfbefa92996c70e2b--sqlmodel.netlify.app

@tiangolo
Copy link
Member

Awesome, thank you @RobertRosca! 🚀

I upgraded the max version to the current latest, as everything is passing with it. 🤓

And thanks everyone for the discussion. The underlying issue was solved in #322, and this version pin will prevent it from happening inadvertently.

This will be available in the next version, in the next hours. SQLModel 0.0.7 🚀

@tiangolo tiangolo merged commit c830c71 into fastapi:main Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants