diff --git a/pkgs/development/python-modules/limits/default.nix b/pkgs/development/python-modules/limits/default.nix index d7f7d55ce343..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 = [ @@ -102,15 +100,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; [ sarahec ]; }; } diff --git a/pkgs/development/python-modules/valkey/default.nix b/pkgs/development/python-modules/valkey/default.nix index 3f56124ed71d..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, @@ -32,8 +33,6 @@ buildPythonPackage rec { version = "6.1.0"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "valkey-io"; repo = "valkey-py"; @@ -78,19 +77,32 @@ 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" ]; - meta = with lib; { + __darwinAllowLocalNetworking = true; + + 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 ]; }; }