From f79252abc3eb82b49e3f1de4720891a629e24b1f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 30 Mar 2023 11:30:58 +0200 Subject: [PATCH] python310Packages.slowapi: switch to pythonRelaxDepsHook --- .../python-modules/slowapi/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/slowapi/default.nix b/pkgs/development/python-modules/slowapi/default.nix index b8f2741cc788..8d6131c811b8 100644 --- a/pkgs/development/python-modules/slowapi/default.nix +++ b/pkgs/development/python-modules/slowapi/default.nix @@ -9,6 +9,7 @@ , pytestCheckHook , pythonAtLeast , pythonOlder +, pythonRelaxDepsHook , redis , starlette }: @@ -27,8 +28,18 @@ buildPythonPackage rec { hash = "sha256-IAB7JW8iVb5M610GVK0POXlSiya22KzNgr26BNvPC4Q="; }; + pythonRelaxDeps = [ + "limits" + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '["redis^3.4.1"]' '["redis"]' + ''; + nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -44,12 +55,6 @@ buildPythonPackage rec { starlette ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'limits = "^1.5"' 'limits = "*"' \ - --replace 'redis = "^3.4.1"' 'redis = "*"' - ''; - disabledTests = [ # AssertionError: Regex pattern 'parameter `request` must be an instance of starlette.requests.Request' does not match 'This portal is not running'. "test_endpoint_request_param_invalid"