Skip to content
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

Fix test_sqlalchemy with sqlalchemy 2 #527

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

csringhofer
Copy link
Collaborator

sqlalchemy 2 (now default on pip) removed some functions used in tests. Updated tests to work both with sqlalchemy 2.* and 1.* (>=1.2).

@rizaon
Copy link

rizaon commented Jan 29, 2024

I did impala-pip install sqlalchemy from Impala repository and it pull sqlalchemy-1.4.51, not sqlalchemy 2. Is that okay?

@rizaon
Copy link

rizaon commented Jan 29, 2024

Nevermind, I create new virtualenv based on python2.7 and installed requirement from README.md. All tests pass with few warnings.

I need to additionally export these two env var to pass impala/tests/test_dbapi_connect.py

IMPYLA_TEST_HIVE_PORT=11050
IMPYLA_TEST_HIVE_USER=hive

@csringhofer
Copy link
Collaborator Author

I did impala-pip install sqlalchemy from Impala repository and it pull sqlalchemy-1.4.51, not sqlalchemy 2. Is that okay?

This is normal for Python 2.7, but in my Python 3 env the version installed by default is sqlalchemy-2.0.25. This is how I bumped to this test issue. I ran the test both in Python 2.7 and 3.8

sqlalchemy 2 (now default on pip in Python 3) removed some
functions used in tests. Updated these to work both with
sqlalchemy 2.* and 1.* (>=1.2).
@csringhofer csringhofer merged commit e4f7bb2 into cloudera:master Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants