trinodb / trino-python-client

Python client for Trino
Apache License 2.0
328 stars 163 forks source link

Add sqlalchemy test matrix to ensure compatibility with 1.3 version #254

Closed mdesmet closed 1 year ago

mdesmet commented 1 year ago

Fixes #250

Description

scalar_one() and scalar_one_or_none() are not available in sqlalchemy 1.3. They have been replaced by scalar() calls.

sqlalchemy has also been added into the ci matrix to ensure compatibility with 1.3 and 1.4 versions.

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required. ( ) Release notes are required, please propose a release note for me. (x) Release notes are required, with the following suggested text:

* Use sqlalchemy 1.3 compatible methods in sqlalchemy dialect.
hovaesco commented 1 year ago

Let's create a compatibility section under https://github.com/trinodb/trino-python-client#sqlalchemy and document which SQLAlchemy versions are supported.

mdesmet commented 1 year ago

Let's create a compatibility section under https://github.com/trinodb/trino-python-client#sqlalchemy and document which SQLAlchemy versions are supported.

Let's handle this as follow up.

mdesmet commented 1 year ago

@hashhar, @hovaesco: My point is that both 1.3 and 1.4 are supported but there will be some rough edges which will only surfaced by adding more integration tests.

I have added the compatibility section though.

john-bodley commented 1 year ago

@mdesmet what's wrong with simply adding a dependency constraint that only SQLAlchemy >= 1.4 is supported? This adheres to the KISS principle and doesn't pollute the code, unit tests, CI build matrix etc.

hashhar commented 1 year ago

Because we can't control what other third party tools use as the version of SQLAlchemy.

I'd love to be able to force a version of SQLAlchemy on the consumer to simply our lives but it's not possible today.