Closed sshah90 closed 7 months ago
running into same issue with Python 3.11.6, macOS-14.4.1 M2 Pro
asn1crypto==1.5.1 Cerberus==1.3.5 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 click-default-group==1.2.4 colorama==0.4.6 coloredlogs==15.0.1 cryptography==42.0.5 filelock==3.13.4 humanfriendly==10.0 idna==3.7 importlib_metadata==7.1.0 jaraco.classes==3.4.0 keyring==24.3.1 more-itertools==10.2.0 packaging==24.0 permifrost==0.15.4 platformdirs==4.2.0 pycparser==2.22 PyJWT==2.8.0 pyOpenSSL==24.1.0 pytz==2024.1 PyYAML==6.0.1 requests==2.31.0 snowflake-connector-python==3.8.1 snowflake-sqlalchemy==1.5.2 sortedcontainers==2.4.0 SQLAlchemy==2.0.29 tomlkit==0.12.4 typing_extensions==4.11.0 urllib3==2.2.1 zipp==3.18.1
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. Python 3.8.13, x86_64, ubuntu 20.04
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 setup.cfg
https://github.com/snowflakedb/snowflake-sqlalchemy/blob/61975bf607434fe8427aaae926549e8ffd3e9bb8/setup.cfg#L50
To using pyproject.toml
+ hatch
https://github.com/snowflakedb/snowflake-sqlalchemy/blob/4db4b9521d42d43a6619bf5ca307e1eaa2c6aa09/pyproject.toml#L41
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 https://github.com/snowflakedb/snowflake-sqlalchemy/pull/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
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 ?
What did you expect to see?
It should be able to import URL without any failures.