From 88e4f87dbd5b0789000af0c0d310f8e8d39e4f1f Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 6 Nov 2025 16:48:36 -0800 Subject: [PATCH 1/3] python3Packages.redshift-connector: cleanup --- .../redshift-connector/default.nix | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/redshift-connector/default.nix b/pkgs/development/python-modules/redshift-connector/default.nix index 46aa57ca12da..63621cb51e97 100644 --- a/pkgs/development/python-modules/redshift-connector/default.nix +++ b/pkgs/development/python-modules/redshift-connector/default.nix @@ -1,25 +1,30 @@ { - beautifulsoup4, - boto3, + lib, buildPythonPackage, fetchFromGitHub, - lib, + + # build-system + setuptools, + + # dependencies + beautifulsoup4, + boto3, + botocore, lxml, packaging, - pytest-mock, - pytestCheckHook, - pythonOlder, pytz, requests, scramp, + + # test + pytest-mock, + pytestCheckHook, }: buildPythonPackage rec { pname = "redshift-connector"; version = "2.1.8"; - format = "setuptools"; - - disabled = pythonOlder "3.6"; + pyproject = true; src = fetchFromGitHub { owner = "aws"; @@ -33,7 +38,9 @@ buildPythonPackage rec { substituteInPlace setup.cfg --replace 'addopts =' 'no-opts =' ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ beautifulsoup4 boto3 lxml @@ -43,6 +50,8 @@ buildPythonPackage rec { scramp ]; + pythonRelaxDeps = [ "lxml" ]; + nativeCheckInputs = [ pytest-mock pytestCheckHook From 28f11e5316770efa1df306e3b5c78eadf647938d Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 6 Nov 2025 17:07:54 -0800 Subject: [PATCH 2/3] python3Packages.redshift-connector: disable broken tests --- .../python-modules/redshift-connector/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/redshift-connector/default.nix b/pkgs/development/python-modules/redshift-connector/default.nix index 63621cb51e97..249a9807bfe5 100644 --- a/pkgs/development/python-modules/redshift-connector/default.nix +++ b/pkgs/development/python-modules/redshift-connector/default.nix @@ -60,6 +60,18 @@ buildPythonPackage rec { # integration tests require a Redshift cluster enabledTestPaths = [ "test/unit" ]; + disabledTests = [ + # AttributeError: 'itertools._tee' object has no attribute 'status_code' + # This is due to a broken pytest_mock. + # TODO Remove once pytest-mock 3.15.1 lands. + "test_form_based_authentication_uses_user_set_login_to_rp" + "test_form_based_authentication_payload_is_correct" + "test_form_based_authentication_login_fails_should_fail" + "test_azure_oauth_based_authentication_payload_is_correct" + "test_okta_authentication_payload_is_correct" + "test_set_cluster_identifier_calls_describe_custom_domain_associations" + ]; + __darwinAllowLocalNetworking = true; # required for tests meta = { From e1604ac22848b472463e5ffd4d4a4945eef35251 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 6 Nov 2025 17:01:50 -0800 Subject: [PATCH 3/3] python3Packages.redshift-connector: 2.1.8 -> 2.1.9 --- .../python-modules/redshift-connector/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/redshift-connector/default.nix b/pkgs/development/python-modules/redshift-connector/default.nix index 249a9807bfe5..50da7338b7e7 100644 --- a/pkgs/development/python-modules/redshift-connector/default.nix +++ b/pkgs/development/python-modules/redshift-connector/default.nix @@ -23,14 +23,14 @@ buildPythonPackage rec { pname = "redshift-connector"; - version = "2.1.8"; + version = "2.1.9"; pyproject = true; src = fetchFromGitHub { owner = "aws"; repo = "amazon-redshift-python-driver"; tag = "v${version}"; - hash = "sha256-q8TQYiPmm3w9Bh4+gvVW5XAa4FZ3+/MZqZL0RCgl77E="; + hash = "sha256-x0VhICEtZZz4Q7btCl7nP0D+YHPIKqbEUWnrEekJpt0="; }; # remove addops as they add test directory and coverage parameters to pytest @@ -43,6 +43,7 @@ buildPythonPackage rec { dependencies = [ beautifulsoup4 boto3 + botocore lxml packaging pytz