-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: SQLAlchemy 1.4 support #1783
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1783 +/- ##
=======================================
Coverage 77.05% 77.05%
=======================================
Files 56 56
Lines 8175 8175
=======================================
Hits 6299 6299
Misses 1876 1876
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Hi, this would be great, but while testing it I got:
DB Creation and initialization failed: get_bind() got an unexpected keyword argument 'bind'
I think that get_bind from flask-sqlalchemy is still incompatible with SQLAlchemy 4.X.
Bump the Flask-SQLAlchemy on requirements.txt
also.
I regenerated the entire |
These arguments create an incompatibility with Flask-SQLAlchemy 2. However, since 'mapper=None, clause=None' is simply the default since SQLAlchemy 0.7.2 (release in 2011), we can simply remove them to be compatible with all reasonably recent SQLAlchemy and Flask-SQLAlchemy versions.
eee40af
to
b3b53ca
Compare
Oh, since all test jobs share the same requirements.txt, the 3.6 test does not run anymore since some of the dependencies have dropped 3.6 (since it already reached EOL). What is a good approach to this? IMO the test jobs should not share requirements.txt because the file depends on Python version. They should instead directly install the package from |
Right but besides that, try your change locally with just SQLAlchemy>=1.4. |
Description
An alternative way to fix #1710. Flask-SQLAlchemy 2 broke the
clause=None
parameter, but sincemapper=None, clause=None
is simply the default since SQLAlchemy 0.7.2 (released more than ten years ago), we can simply fix the problem by not passing those parameters at all.ADDITIONAL INFORMATION