You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SNOW-3121122: Meta: Support for SQLAlchemy 2.1 #652
snowflake-sqlalchemy cannot be imported when SQLAlchemy 2.1.0b1 is installed. Example issue:
>>> from snowflake import sqlalchemy
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
from snowflake import sqlalchemy
File "/home/USER/repositories/snowflake-sqlalchemy/src/snowflake/sqlalchemy/__init__.py", line 30, in <module>
from . import base, snowdialect # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/USER/repositories/snowflake-sqlalchemy/src/snowflake/sqlalchemy/base.py", line 240, in <module>
class SnowflakeORMSelectCompileState(context.ORMSelectCompileState):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'sqlalchemy.orm.context' has no attribute 'ORMSelectCompileState'
What is the desired behavior?
Short term - ability to import snowflake-sqlalchemy when SQLAlchemy 2.1 is installed.
Long term - full support for SQLAlchemy 2.1.
How would this improve snowflake-connector-python?
Better flexibility for integration with other tools.
Hi,
The support for 2.1 is on a wait list.
To experiment with 2.1 we suggest cloning the repo and installing the dialect from the repo pip install 'git+ssh://...'
I am aware of the official plans (as discussed in #635). I created this issue per suggestion/request of @sfc-gh-mborins. The idea is to have an issue that tracks the progress of adding such support.
While development of "official" support has not yet started, does it also mean the project isn't willing to accept patches adding "unofficial, use at your own risk" support?
Hey @Dev-iL,
Sorry, I didn't look at this issue before looking at the PR. Yes, we do appreciate having a public issue that serves as a tracker for a given feature in the project.
At the same time, even though we also value patches for these tracked items, we would prefer to integrate them later, once we are explicitly focused on adapting to newer SQLAlchemy versions. For now, our priority is addressing existing issues, open pull requests, and known inconsistencies in the project.
Regardless of the current level of “official” support, this is a public library used by many people. Larger behavioral or compatibility changes should therefore be backed by an analysis that we currently lack for this particular change.
If you would like to contribute, I’d highly recommend starting with a short conversation (here, in a GitHub discussion, via email, or via another communication channel) about areas that are still in scope to address now. That would help ensure any proposed changes align with our current focus and roadmap.
In the future, we would like to improve this process by creating a public roadmap with entries per quarter and creating proper contributing guidelines for the community, but for now, we have to work around the lack of both.
Hi, SQLAlchemy 2.1.0 rolled out officially yesterday. Since the current release of snowflake-sqlalchemy does not support SQLAlchemy 2.1, I suggest capping the dependency version at < 2.1, to make the fact explicit and to prevent installing incompatible versions, especially since support for 2.1 is not a main priority right now.
I understand that sqlalchemy versions earlier than 2.1 are not safe in free threading mode. I am not using that feature but I am trying to implement concurrent sub processes where the snowflake access is distributed across multiple interpreters.
It appears that with sqlalchemy in the project code base sqlalchemy 21 is a gateway to these ambitions. I would hope unlocking python parallel features would rwnk high on your road map
Activity
[-]Meta: Support for SQLAlchemy 2.1[/-][+]SNOW-3121122: Meta: Support for SQLAlchemy 2.1[/+]sfc-gh-mraba commentedon Mar 2, 2026
Hi,
The support for 2.1 is on a wait list.
To experiment with 2.1 we suggest cloning the repo and installing the dialect from the repo
pip install 'git+ssh://...'Dev-iL commentedon Mar 2, 2026
Hi @sfc-gh-mraba,
I am aware of the official plans (as discussed in #635). I created this issue per suggestion/request of @sfc-gh-mborins. The idea is to have an issue that tracks the progress of adding such support.
While development of "official" support has not yet started, does it also mean the project isn't willing to accept patches adding "unofficial, use at your own risk" support?
sfc-gh-jcieslak commentedon Mar 10, 2026
Hey @Dev-iL,
Sorry, I didn't look at this issue before looking at the PR. Yes, we do appreciate having a public issue that serves as a tracker for a given feature in the project.
At the same time, even though we also value patches for these tracked items, we would prefer to integrate them later, once we are explicitly focused on adapting to newer SQLAlchemy versions. For now, our priority is addressing existing issues, open pull requests, and known inconsistencies in the project.
Regardless of the current level of “official” support, this is a public library used by many people. Larger behavioral or compatibility changes should therefore be backed by an analysis that we currently lack for this particular change.
If you would like to contribute, I’d highly recommend starting with a short conversation (here, in a GitHub discussion, via email, or via another communication channel) about areas that are still in scope to address now. That would help ensure any proposed changes align with our current focus and roadmap.
In the future, we would like to improve this process by creating a public roadmap with entries per quarter and creating proper contributing guidelines for the community, but for now, we have to work around the lack of both.
RobinMcCann commentedon Sep 25, 2026
Hi, SQLAlchemy 2.1.0 rolled out officially yesterday. Since the current release of snowflake-sqlalchemy does not support SQLAlchemy 2.1, I suggest capping the dependency version at < 2.1, to make the fact explicit and to prevent installing incompatible versions, especially since support for 2.1 is not a main priority right now.
Pin sqlalchemy<2.1 for existing snowflake-sqlalchemy builds (#1260)
Jonblunt999 commentedon Oct 7, 2026
I understand that sqlalchemy versions earlier than 2.1 are not safe in free threading mode. I am not using that feature but I am trying to implement concurrent sub processes where the snowflake access is distributed across multiple interpreters.
It appears that with sqlalchemy in the project code base sqlalchemy 21 is a gateway to these ambitions. I would hope unlocking python parallel features would rwnk high on your road map
Dev-iL commentedon Oct 24, 2026
Looks like support was added by 223f9d6
sfc-gh-mraba commentedon Oct 26, 2026
We just release dialect 2.1.0 with support for SQLAlchemy 2.1.x
https://github.com/snowflakedb/snowflake-sqlalchemy/releases/tag/v2.1.0