-
Notifications
You must be signed in to change notification settings - Fork 151
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
SNOW-1324105: ImportError: cannot import name 'string_types' from 'sqlalchemy.util.compat' due to latest SQLAlchemy version #485
Comments
running into same issue with Python 3.11.6, macOS-14.4.1 M2 Pro |
Same issue trying to use Django 4.2 + django-snowflake 4.2 which has a dependency on snowflake-sqlalchemy (~=1.5.x). Reverting snowflake-sqlalchemy version 1.5.2 to 1.5.1 fixed the issue. |
Yeah, looks like there's something wrong with the latest version. Might be something to do with updating to using the latest version of sqlalchemy 2.0. Pinning to 1.5.1 worked - it's still using sqlalchemy 1.4. |
From a quick look, it seems like between versions, this package changed from specifying the dependencies with snowflake-sqlalchemy/setup.cfg Line 50 in 61975bf
To using snowflake-sqlalchemy/pyproject.toml Line 41 in 4db4b95
I am not familiar with hatch , but looks like there's a version requirement missing in the specifier.Either that, or this change was on purpose and we missed some announcement or doc. In any case, this does not seem like a change to do in a patch version. |
hi folks, thanks for reporting - yes definitely this is unexpected and not a planned change to go to sqlalchemy 2 in a patch version but rather a bug. We'll take a look. |
fix is #486 which is now merged. I'm reopening this issue to be able to properly track, because we need to release the next version which carries the fix expected by latest April release cycle (end of month) |
fix released with v1.5.3 |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using?
3.10
What operating system and processor architecture are you using?
macOS-14.4.1-x86_64-i386-64bit
What are the component versions in the environment (
pip freeze
)?I created brand new virtual environments and install snowflake-sqlalchemy
I installed newest version of snowflake-sqlalchemy v1.5.2 which brings SQLAlchemy==2.0.29 which causing import errors.
With v1.5.1, it's working fine.
I ran below import command
from snowflake.sqlalchemy import URL
I got below Error:
Do we need to lock dependency at pyproject.toml ?
It should be able to import URL without any failures.
The text was updated successfully, but these errors were encountered: