Skip to content

SNOW-3121122: Meta: Support for SQLAlchemy 2.1 #652

@Dev-iL

Description

@Dev-iL

What is the current behavior?

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.

References, Other Background

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions