From 28b5164fca6135cb545ad9fd3baa04f193b7f20a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 May 2021 23:45:55 +0200 Subject: [PATCH] python3Packages.snowflake-connector-python: 2.4.1 -> 2.4.3 --- .../snowflake-connector-python/default.nix | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/snowflake-connector-python/default.nix b/pkgs/development/python-modules/snowflake-connector-python/default.nix index fdf984563ea0..237f36e201b6 100644 --- a/pkgs/development/python-modules/snowflake-connector-python/default.nix +++ b/pkgs/development/python-modules/snowflake-connector-python/default.nix @@ -1,5 +1,6 @@ -{ buildPythonPackage -, isPy27 +{ lib +, buildPythonPackage +, pythonOlder , asn1crypto , azure-storage-blob , boto3 @@ -10,7 +11,6 @@ , idna , ijson , isPy3k -, lib , oscrypto , pyarrow , pyasn1-modules @@ -25,20 +25,14 @@ buildPythonPackage rec { pname = "snowflake-connector-python"; - version = "2.4.1"; - disabled = isPy27; + version = "2.4.3"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "5c9180e61202a7beb1df83231688423091ca0a04ee559d2a78ff77f9c727baae"; + sha256 = "sha256-+jAfUwaofWM5Ef1kk4AEAbBM/UES8/ZzLd4QJfkEQsM="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "'pyOpenSSL>=16.2.0,<20.0.0'," "'pyOpenSSL'," \ - --replace 'pytz<2021.0' 'pytz' - ''; - propagatedBuildInputs = [ azure-storage-blob asn1crypto @@ -55,16 +49,26 @@ buildPythonPackage rec { pytz requests six - ] ++ lib.optionals (!isPy3k) [ pyarrow pyasn1-modules urllib3 ]; - # tests require encrypted secrets, see + postPatch = '' + # https://github.com/snowflakedb/snowflake-connector-python/issues/705 + substituteInPlace setup.py \ + --replace "idna>=2.5,<3" "idna" \ + --replace "chardet>=3.0.2,<4" "chardet" + ''; + + # Tests require encrypted secrets, see # https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters doCheck = false; - pythonImportsCheck = [ "snowflake" "snowflake.connector" ]; + + pythonImportsCheck = [ + "snowflake" + "snowflake.connector" + ]; meta = with lib; { description = "Snowflake Connector for Python";