snowflake-connector-python icon indicating copy to clipboard operation
snowflake-connector-python copied to clipboard

SNOW-668640: Dependency on `cryptography` conflicts with the one on `pyopensssl`

Open WilkenSteiner opened this issue 2 years ago • 7 comments

Yesterday, pyopenssl==22.1.0 has been released, which now requires cryptography>=38.0. The requirement cryptography<0.37 In combination with the dependency pyopenssl<23.0.0 in snowflake-connector-python then results in failure to lock for Pipenv users.

Are there plans to upgrade cryptography? In the meantime, this could be fixed restricting pyopenssl<22.1.0. Is a PR welcome?

  1. What version of Python are you using?

    Python 3.8 to 3.10

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

    Linux

  3. What did you do?

    Running pipenv install snowflake-connector-python fails with ERROR: Could not find a version that matches cryptography<37.0.0,<39,>=3.1.0,>=38.0.0 (from snowflake-connector-python==2.7.12

WilkenSteiner avatar Sep 26 '22 14:09 WilkenSteiner

#1247

vatsalvora avatar Sep 26 '22 15:09 vatsalvora

probably the easier PR for maintainers to accept: #1246

jskrzypek avatar Sep 26 '22 16:09 jskrzypek

Thanks for this report, my org is affected by this as well. We would love to see #1246 merged in the near future.

speedyturkey avatar Sep 29 '22 15:09 speedyturkey

Weird, dependabot closed #1246 saying cryptography is no longer available...

jskrzypek avatar Sep 30 '22 14:09 jskrzypek

Fortunately, it looks like #1266 has resolved things, so this issue should be closed.

speedyturkey avatar Oct 11 '22 14:10 speedyturkey

Since #1266 isn't included in a release tag yet, you can install the specific commit in pipenv with

pipenv install 'git+https://github.com/snowflakedb/snowflake-connector-python.git@1b1e2c427c6c78e8c4f375c6da2bc8f118a9c4f6#egg=snowflake-connector-python'

WillKoehrsen avatar Oct 11 '22 15:10 WillKoehrsen

We have the same issue and we can see that it has been solved in main. However the VCS style requirement (as correctly pointed out by Will above) does not work nicely everywhere. For example we are using Pants in our monorepo and we had to spend a few hours to figure out what hoops we needed to jump through to make the VCS requirement work.

In my opinion the fix for this type of issue should be released as quickly as possible - given 2.8.0 could be considered "broken". As a patch on top of latest released if needed (2.8.1?). Especially for a package maintained by a large company like Snowflake (no doubt we're all paying customers here). Also, this is not any package - this is the core connector for Python which I presume is a major (if not the top, after SQL?) language across Snowflake users.

ynouri avatar Oct 19 '22 19:10 ynouri

Closing, because the constraint on cryptography was relaxed with release v2.8.1.

WilkenSteiner avatar Nov 07 '22 13:11 WilkenSteiner