From c9cba7a1ea804dfcbd4bbef723373b9966f0b624 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 5 Jul 2025 20:52:35 -0700 Subject: [PATCH 1/5] python3Packages.valkey: cleanup --- pkgs/development/python-modules/valkey/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/valkey/default.nix b/pkgs/development/python-modules/valkey/default.nix index 3f56124ed71d..48801cf68b73 100644 --- a/pkgs/development/python-modules/valkey/default.nix +++ b/pkgs/development/python-modules/valkey/default.nix @@ -32,8 +32,6 @@ buildPythonPackage rec { version = "6.1.0"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "valkey-io"; repo = "valkey-py"; @@ -86,11 +84,11 @@ buildPythonPackage rec { "test_psync" ]; - meta = with lib; { + meta = { description = "Python client for Redis key-value store"; homepage = "https://github.com/valkey-io/valkey-py"; changelog = "https://github.com/valkey-io/valkey-py/releases/tag/${src.tag}"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ hexa ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hexa ]; }; } From 61511b707e7c2d1a3d6bb460461dfd6596b39191 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 5 Jul 2025 21:05:50 -0700 Subject: [PATCH 2/5] python3Packages.valkey: fix test errors on Darwin --- .../python-modules/valkey/default.nix | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/valkey/default.nix b/pkgs/development/python-modules/valkey/default.nix index 48801cf68b73..25cac9c152b2 100644 --- a/pkgs/development/python-modules/valkey/default.nix +++ b/pkgs/development/python-modules/valkey/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, fetchFromGitHub, buildPythonPackage, pythonOlder, @@ -76,14 +77,27 @@ buildPythonPackage rec { pytestFlagsArray = [ "-m 'not onlycluster and not ssl'" ]; - disabledTests = [ - # valkey.sentinel.MasterNotFoundError: No master found for 'valkey-py-test' - "test_get_from_cache" - "test_cache_decode_response" - # Expects another valkey instance on port 6380 *shrug* - "test_psync" + disabledTests = + [ + # valkey.sentinel.MasterNotFoundError: No master found for 'valkey-py-test' + "test_get_from_cache" + "test_cache_decode_response" + # Expects another valkey instance on port 6380 *shrug* + "test_psync" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # OSError: AF_UNIX path too long + "test_uds_connect" + "test_network_connection_failure" + ]; + + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ + # AttributeError: Can't get local object 'TestMultiprocessing.test_valkey_client..target' + "tests/test_multiprocessing.py" ]; + __darwinAllowLocalNetworking = true; + meta = { description = "Python client for Redis key-value store"; homepage = "https://github.com/valkey-io/valkey-py"; From 7a526337ac62346b9cba3ba6840f04641da84ed9 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 5 Jul 2025 21:23:03 -0700 Subject: [PATCH 3/5] python3Packages.limits: disable flaky test --- pkgs/development/python-modules/limits/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index d7f7d55ce343..0b1b5870c642 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -102,15 +102,19 @@ buildPythonPackage rec { pytestFlagsArray = [ "--benchmark-disable" ]; - disabledTests = [ "test_moving_window_memcached" ]; + disabledTests = [ + "test_moving_window_memcached" + # Flaky: compares time to magic value + "test_sliding_window_counter_previous_window" + ]; pythonImportsCheck = [ "limits" ]; - meta = with lib; { + meta = { description = "Rate limiting using various strategies and storage backends such as redis & memcached"; homepage = "https://github.com/alisaifee/limits"; changelog = "https://github.com/alisaifee/limits/releases/tag/${src.tag}"; - license = licenses.mit; - maintainers = [ ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } From 935ba2a1ef3ca968e861918cae8d19e17c41874f Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 5 Jul 2025 21:23:30 -0700 Subject: [PATCH 4/5] python3Packages.limits: add sarahec as maintainer --- pkgs/development/python-modules/limits/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index 0b1b5870c642..fe8aa2753624 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -115,6 +115,6 @@ buildPythonPackage rec { homepage = "https://github.com/alisaifee/limits"; changelog = "https://github.com/alisaifee/limits/releases/tag/${src.tag}"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ ]; + maintainers = with lib.maintainers; [ sarahec ]; }; } From c44703367b447820e73c19b04e19e2e7f4c7dc81 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 5 Jul 2025 21:27:07 -0700 Subject: [PATCH 5/5] python3Packages.limits: 5.2.0 -> 5.4.0 https://github.com/alisaifee/limits/releases/tag/5.3.0 https://github.com/alisaifee/limits/releases/tag/5.4.0 --- pkgs/development/python-modules/limits/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index fe8aa2753624..f2e76f1cf317 100644 --- a/pkgs/development/python-modules/limits/default.nix +++ b/pkgs/development/python-modules/limits/default.nix @@ -27,11 +27,9 @@ buildPythonPackage rec { pname = "limits"; - version = "5.2.0"; + version = "5.4.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "alisaifee"; repo = "limits"; @@ -39,10 +37,10 @@ buildPythonPackage rec { # Upstream uses versioneer, which relies on git attributes substitution. # This leads to non-reproducible archives on github. Remove the substituted # file here, and recreate it later based on our version info. + hash = "sha256-EHLqkd5Muazr52/oYaLklFVvF+AzJWGbFaaIG+T0ulE="; postFetch = '' rm "$out/limits/_version.py" ''; - hash = "sha256-0D44XaSZtebMnn9mqXbaE7FB7usdu/eZ/4UE3Ye0oyA="; }; patches = [