Skip to content

printing http response as info in client.py cancel() #215

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
EugeneChung opened this issue Aug 11, 2022 · 4 comments · Fixed by #216
Closed

printing http response as info in client.py cancel() #215

EugeneChung opened this issue Aug 11, 2022 · 4 comments · Fixed by #216

Comments

@EugeneChung
Copy link
Contributor

EugeneChung commented Aug 11, 2022

Hi all.

[INFO|client.py:807] 2022-08-11 10:01:04,392 > <Response [204]>

https://github.com./trinodb/trino-python-client/blame/e26027375326a1e0fc8a472d242af75b4e6049bc/trino/client.py#L807

Is it intended or should it be debug level?

@hashhar
Copy link
Member

hashhar commented Aug 11, 2022

It doesn't seem to be intended. Would you like to send a PR?

@EugeneChung
Copy link
Contributor Author

@hashhar Okay~

@EugeneChung
Copy link
Contributor Author

EugeneChung commented Aug 11, 2022

FYI, it happens because of #195 .
Calling sqlalchemy result.scalar() from trino/sqlalchemy/dialect.py#_get_server_version_info() closes the cursor which is not finished, and it causes cancelling of SELECT version() query.

@guyco33
Copy link
Member

guyco33 commented Aug 12, 2022

FYI, it happens because of #195 . Calling sqlalchemy result.scalar() from trino/sqlalchemy/dialect.py#_get_server_version_info() closes the cursor which is not finished, and it causes cancelling of SELECT version() query.

@hashhar @EugeneChung
#210 fixes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants