Skip to content

Update setup.py #353

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

Closed

Conversation

GitToby
Copy link

@GitToby GitToby commented Apr 5, 2023

Description

Limit the sqlachemy version requires to sidestep pandas+sqlalchemy>2.0.0 issues with pd.read_sql(), pd.read_sql_table() and pd.read_sql_query(). See #352

Non-technical explanation

Installing trino[sqlalchemy] installs a version that breaks methods such as pd.read_sql() and pd.read_sql_table(). This will limit the sqlalchemy version to sidestep these bugs.

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:

Limit the sqlachemy version requires to sidestep pandas+sqlalchemy>2.0.0 issues with `pd.read_sql()`, `pd.read_sql_table()` and `pd.read_sql_query()`. ({Installing trino[sqlalchemy] wont allow pandas.read_sql}`#352`)

@cla-bot
Copy link

cla-bot bot commented Apr 5, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@mdesmet
Copy link
Contributor

mdesmet commented Apr 6, 2023

Hi @GitToby, we actually want to be compatible with sqlalchemy 2.0.0. What is exactly the issue that you are facing?

@GitToby
Copy link
Author

GitToby commented Apr 7, 2023

see issue #352 - ultimately this is an issue due to the bug in pandas where pandas 1.5.x doesn't work with sqlalchemy>2.0.0 because of a change in API. The default trio[sqlalchemy] install will hence fail when calling the pandas methods that leverage sqlalchemy tools.

@hashhar
Copy link
Member

hashhar commented Apr 18, 2023

This is something Pandas fixed in their 2.0 release. It should be improved upstream in Pandas (or by the user by pinning a specific version) in case of incompatibilities. This client itself works with SQLA 2.x fine so no changes need to be done here.

@hashhar hashhar closed this Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants