Closed giovannipizzi closed 3 years ago
I didn't check this yet - let's see what errors we get, if any
I think this was because of python 3.5 support being dropped in SQLAlchemy 1.4. Now that #106 is merged (py3.5 support dropped), I'm here moving the limit to <2, so we check this works.
It couldn't have been this because sqlalchemy
specifies the python_requires
in its setup.py
and so pip will not install an incompatible version. As you can see the tests do actually fail, seemingly because of a problem with sqlalchemy
except I have to admit I don't really understand what it refers to.
Ok thanks for the message. I'll moved this back to draft, so we can use the branch to test how to fix the problem.
For my own reference: https://docs.sqlalchemy.org/en/14/changelog/migration_14.html I think the issue might be related to the change with the old way of bulk update/delete. It used to be
session.query(User).filter(User.name == 'sandy').update({"password": "foobar"}, synchronize_session="fetch")
and will be
with Session(engine, future=True) as sess:
stmt = update(User).where(
User.name == 'sandy'
).values(password="foobar").execution_options(
synchronize_session="fetch"
)
sess.execute(stmt)
I guess it should be easy to fix, but I will need to investigate more to check if this is really the thing to fix. For now, I leave this as a note, not to forget.
I fixed the issue, but I wouldn't merge this yet - I think it makes sense to replace all session.query()
with the 2.0 syntax so we're future proof. In any case, this is not urgent, as long as also AiiDA does not support SQLA 1.4 we won't use the SQLA 1.4-compatible version of this library.
Merging #108 (b0218d4) into develop (7a894a4) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## develop #108 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 1541 1544 +3
=========================================
+ Hits 1541 1544 +3
Impacted Files | Coverage Δ | |
---|---|---|
disk_objectstore/container.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7a894a4...b0218d4. Read the comment docs.
superceded by #114
Limit was on sqlalchemy<1.4. I think this was because of python 3.5 support being dropped in SQLAlchemy 1.4. Now that #106 is merged (py3.5 support dropped), I'm here moving the limit to <2, so we check this works.