Skip to content

SNOW-739749: snowflake-sqlalchemy 1.4.4 requires sqlalchemy<2.0.0,>=1.4.0, but you have sqlalchemy 2.0.1 which is incompatible. #380

Closed

Description

@sfc-gh-jgriffith

Error when attempting to install snowflake-sqlalchemy with sqlalchemy 2.0. Error:
snowflake-sqlalchemy 1.4.4 requires sqlalchemy<2.0.0,>=1.4.0, but you have sqlalchemy 2.0.1 which is incompatible.

Version 1.4.1 release notes say snowflake-sqlalchemy is now SQLAlchemy 2.0 compatible.

sqlalchemy<2.0.0,>=1.4.0

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.8.16

  2. What operating system and processor architecture are you using?

    macOS-10.16-x86_64-i386-64bit

  3. What are the component versions in the environment (pip freeze)?

    asn1crypto==1.5.1
    certifi @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_477u68wvzm/croot/certifi_1671487773341/work/certifi
    cffi==1.15.1
    charset-normalizer==2.1.1
    cryptography==38.0.4
    filelock==3.9.0
    greenlet==2.0.2
    idna==3.4
    oscrypto==1.3.0
    pycparser==2.21
    pycryptodomex==3.17
    PyJWT==2.6.0
    pyOpenSSL==22.1.0
    pytz==2022.7.1
    requests==2.28.2
    snowflake-connector-python==2.9.0
    SQLAlchemy==2.0.1
    typing_extensions==4.4.0
    urllib3==1.26.14

  4. What did you do?

    pip install snowflake-sqlalchemy

  5. What did you expect to see?

    Successfully installed snowflake-sqlalchemy-1.4.4

  6. Can you set logging to DEBUG and collect the logs?

Activity

  1. changed the title [-]snowflake-sqlalchemy 1.4.4 requires sqlalchemy<2.0.0,>=1.4.0, but you have sqlalchemy 2.0.1 which is incompatible.[/-] [+]SNOW-739749: snowflake-sqlalchemy 1.4.4 requires sqlalchemy<2.0.0,>=1.4.0, but you have sqlalchemy 2.0.1 which is incompatible.[/+] on Feb 6, 2023
  2. sfc-gh-aling commented on Feb 7, 2023

    @sfc-gh-aling
    Collaborator

    hey @sfc-gh-jgriffith, we're aware of the V2 GA release of sqlalchemy.
    We will plan time for testing it and do release accordingly.

  3. stuck1233333 commented on Feb 17, 2023

    @stuck1233333

    Do you have an estimated release timeframe for this?

  4. qwertystop commented on Feb 26, 2023

    @qwertystop

    Seconded the request for a timeframe, especially given that a previous version explicitly said it added compatibility.

  5. cladden commented on Mar 6, 2023

    @cladden

    We would like to use sqlalchemy 2.0 as well, but this is blocking - is there a release timeframe?

  6. cpcloud commented on Mar 7, 2023

    @cpcloud

    Any idea when sqlalchemy 2.0 support might land?

  7. cladden commented on Mar 9, 2023

    @cladden

    hey @sfc-gh-jgriffith, we're aware of the V2 GA release of sqlalchemy.

    We will plan time for testing it and do release accordingly.

    @sfc-gh-aling do you have any updates on this?

  8. hellobrett commented on Mar 15, 2023

    @hellobrett

    Hi @sfc-gh-aling -- I see an update to snowflake-sqlalchemy just went out! Support for 2.0 yet!? As of this morning, it's still restricted to <2.0 upon installation.

    https://pypi.org/project/snowflake-sqlalchemy/

  9. benoneill-tenzo commented on Mar 15, 2023

    @benoneill-tenzo

    Would also quite like to know a release timeframe for 2.0 support :)

  10. cladden commented on Mar 15, 2023

    @cladden

    I was curious how close snowflake-sqlalchemy is from supporting sqlalchemy 2.0, so I manually installed it:

    pip install --no-deps snowflake-sqlalchemy==1.4.6
    

    It seems very close!

    After some monkey-patching, I was able to create an engine and connect to snowflake:

    def snowflake_sqlalchemy_20_monkey_patches():
        import sqlalchemy.util.compat
    
        # make strings always return unicode strings
        sqlalchemy.util.compat.string_types = (str,)
        sqlalchemy.types.String.RETURNS_UNICODE = True
    
        import snowflake.sqlalchemy.snowdialect
    
        snowflake.sqlalchemy.snowdialect.SnowflakeDialect.returns_unicode_strings = True
    
        # make has_table() support the `info_cache` kwarg
        import snowflake.sqlalchemy.snowdialect
    
        def has_table(self, connection, table_name, schema=None, info_cache=None):
            """
            Checks if the table exists
            """
            return self._has_object(connection, "TABLE", table_name, schema)
    
        snowflake.sqlalchemy.snowdialect.SnowflakeDialect.has_table = has_table
    
    # usage: call this function before creating an engine:
    snowflake_sqlalchemy_20_monkey_patches()
    

    @sfc-gh-aling and snowflake team, for your 2.0 porting efforts, maybe 👆is helpful in assessing the gaps?

  11. rosomri commented on Mar 30, 2023

    @rosomri

    @sfc-gh-aling Any updates?

  12. cpcloud commented on Mar 30, 2023

    @cpcloud

    Would love to see support for sqlalchemy 2 in snowflake-sqlalchemy!

  13. 33 remaining items

  14. YarShev commented on Jul 2, 2024

    @YarShev

    #469 is closed. Should we consider this issue resolved?

  15. added
    status-fixed_awaiting_releaseThe issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.
    and removed
    status-in_progressIssue is worked on by the driver team
    on Jul 2, 2024
  16. sfc-gh-dszmolka commented on Jul 2, 2024

    @sfc-gh-dszmolka
    Contributor

    Indeed! I'll close this issue once the version which is compatible with SQLAlchemy 2.0 is finally released.

  17. YarShev commented on Jul 2, 2024

    @YarShev

    Should we expect that version latest by autumn 2024 as mentioned above?

  18. sfc-gh-dszmolka commented on Jul 4, 2024

    @sfc-gh-dszmolka
    Contributor

    still don't have a definite and committed-to date from the Product team but I believe the plans to approach the release might have changed.
    Just saw #514 so hopefully release v1.6.0 which is compatible with SQLAlchemy 2.0 is released way sooner than the original worst-case estimation of autumn 2024.

  19. YarShev commented on Jul 4, 2024

    @YarShev

    Look forward to that version. Thanks!

  20. sfc-gh-dszmolka commented on Jul 9, 2024

    @sfc-gh-dszmolka
    Contributor

    After such a long wait, release v1.6.0 is out ! This is the one bringing compatibility with SQLAlchemy 2.0 and can be right now downloaded directly from here.

    For some reason it's not available on pip yet (still 1.5.3 is the latest) , we're working on this and will update this same thread.

    edit: issue looks to be fixed, but due to the nature of the issue we'll need to release a new version (1.6.1) which will happen soon. will keep this thread updated as events evolve.

    Thank you everyone again for bearing with us for such a long time !

  21. Mrfence97 commented on Jul 9, 2024

    @Mrfence97

    Hooray 🎉! Thanks to all the team for working on this.

  22. tvoipio commented on Jul 9, 2024

    @tvoipio

    Excellent news, thanks to the team! Could you kindly comment here when 1.6.0 is available on PyPI and conda-forge? Our engineers might look at me funny if deployments involve downloading packages from some GitHub repository... (and I completely understand there is some kind of a delay, just trying to avoid having to poll both channels to see when we can update)

  23. edgarrmondragon commented on Jul 9, 2024

    @edgarrmondragon
    Contributor

    Excellent news, thanks to the team! Could you kindly comment here when 1.6.0 is available on PyPI and conda-forge? Our engineers might look at me funny if deployments involve downloading packages from some GitHub repository... (and I completely understand there is some kind of a delay, just trying to avoid having to poll both channels to see when we can update)

    The publishing workflow was broken and they seem to have fixed it in #520, so I think it's just a matter of them creating a 1.6.1 release now.

  24. edgarrmondragon commented on Jul 9, 2024

    @edgarrmondragon
    Contributor
  25. sfc-gh-dszmolka commented on Jul 9, 2024

    @sfc-gh-dszmolka
    Contributor

    indeed ! aforementioned temporal issue with the release is now fixed, and v1.6.1 version of the library is now out.

    This marks a big milestone, and again i would like to thank you all for your patience here ! Marking this issue as closed :)

  26. unpinned this issue on Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementThe issue is a request for improvement or a new featurestatus-fixed_awaiting_releaseThe issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.status-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions