Trino 0.317 broke compatibility with SQLAlchemy 1.3.24
See original GitHub issueExpected behavior
Calling _get_server_version_info
works with SQLAlchemy 1.3.24.
Actual behavior
Calling _get_server_version_info
throws an AttributeError
def _get_server_version_info(self, connection: Connection) -> Any:
query = "SELECT version()"
try:
res = connection.execute(sql.text(query))
> version = res.scalar_one()
E AttributeError: 'ResultProxy' object has no attribute 'scalar_one'
venv/lib/python3.10/site-packages/trino/sqlalchemy/dialect.py:337: AttributeError
Steps To Reproduce
I believe 7c97873af5a3bf390d8e4d75721b6c60e1a085e9 is the culprit here.
Log output
see above
Operating System
ubuntu in github actions
Trino Python client version
0.317
Trino Server version
n/a
Python version
repro’d on both 3.7 and 3.10
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The 1.3.24 release broke Python 3.4 compatibility · Issue #6168
The 1.3.x line continues to work with Python 3.4 or it is explicitly declared as incompatible. To Reproduce. import sqlalchemy.
Read more >1.3 Changelog — SQLAlchemy 2.0 Documentation
Fixed issue in the area of where loader options such as selectinload() interact with the baked query system, such that the caching of...
Read more >sqlalchemy-trino - PyPI
sqlalchemy -trino was developed as Trino (f.k.a PrestoSQL) dialect for SQLAlchemy. Since trinodb/trino-python-client#81, all code of sqlalchemy-trino is ...
Read more >getting error with SQLAlchemy 1.3.24 and postgresql backend
solved the issue by removing .execution_options(schema_translate_map={None: prjkey}),. This did not give problem with SQLAlchemy 1.4 but ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sqlalchemy~=1.3
is the same assqlalchemy>=1.3, ==1.*
. As such, it actually does allow installing1.4.x
(stack overflow)Adding a test matrix in CI would probably be a great fix.
@hashhar , @ebyhr : I suggest we add all supported sqlalchemy major versions to a CI test matrix in order to avoid such breaking changes.