crate / sqlalchemy-cratedb

SQLAlchemy dialect for CrateDB.
https://cratedb.com/docs/sqlalchemy-cratedb/
Apache License 2.0
3 stars 2 forks source link

SQLAlchemy: Maintenance support for SQLAlchemy 1.3 #108

Closed amotl closed 1 year ago

amotl commented 1 year ago

Hi.

While working on support for SQLAlchemy 2.0 on behalf of crate/crate-python#485 and crate/crate-python#488, we discovered that the updated code will no longer be compatible with SQLAlchemy 1.3.

ImportError: cannot import name 'declarative_base' from 'sqlalchemy.orm'
sqlalchemy.exc.ArgumentError: columns argument to select() must be a Python list or other iterable

While SQLAlchemy 1.3 is effectively EOL, we may still want to keep supporting it for a while for users of the CrateDB dialect.

If you agree, we will have to come up with a proper release and deprecation plan.

My proposal, already briefly discussed with @seut, would be to run a 0.30.0 maintenance release, which adds a corresponding warning for users who are still on SA13. Then, we would move on by integrating the SA20 changes, and probably release them with a crate-python 1.0.0 version (maybe after running a few 1.0.0bX releases). In this manner, the 1.x series will support SA14 and SA20, while the 0.x series would still be able to receive maintenance patches, and keeps supporting SA13.

With kind regards, Andreas.

amotl commented 1 year ago

Inspired by comments from the upstream authors at https://github.com/sqlalchemy/sqlalchemy/issues/8631#issuecomment-1362880407, crate/crate-python#497 retains compatibility with SQLAlchemy 1.3.