1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00

python310Packages.slowapi: switch to pythonRelaxDepsHook

This commit is contained in:
Fabian Affolter 2023-03-30 11:30:58 +02:00
parent 2c1f99f38e
commit f79252abc3

View file

@ -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"