summary refs log tree commit diff
path: root/pkgs/development/python-modules/requests-cache/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/requests-cache/default.nix')
-rw-r--r--pkgs/development/python-modules/requests-cache/default.nix25
1 files changed, 19 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/requests-cache/default.nix b/pkgs/development/python-modules/requests-cache/default.nix
index f85d2b2debe..d04f25ae0e0 100644
--- a/pkgs/development/python-modules/requests-cache/default.nix
+++ b/pkgs/development/python-modules/requests-cache/default.nix
@@ -1,23 +1,28 @@
 { lib
-, appdirs
 , attrs
 , buildPythonPackage
 , bson
 , boto3
 , botocore
 , cattrs
-, exceptiongroup
 , fetchFromGitHub
 , itsdangerous
+, platformdirs
 , poetry-core
+, psutil
 , pymongo
 , pytestCheckHook
+, pytest-rerunfailures
+, pytest-xdist
 , pythonOlder
 , pyyaml
 , redis
 , requests
 , requests-mock
+, responses
 , rich
+, tenacity
+, time-machine
 , timeout-decorator
 , ujson
 , urllib3
@@ -26,7 +31,7 @@
 
 buildPythonPackage rec {
   pname = "requests-cache";
-  version = "0.9.8";
+  version = "1.1.0";
   format = "pyproject";
 
   disabled = pythonOlder "3.7";
@@ -35,7 +40,7 @@ buildPythonPackage rec {
     owner = "requests-cache";
     repo = "requests-cache";
     rev = "refs/tags/v${version}";
-    hash = "sha256-Xbzbwz80xY8IDPDhZEUhmmiCFJZvSQMQ6EmE4EL7QGo=";
+    hash = "sha256-kJqy7aK67JFtmsrwMtze/wTM9qch9YYj2eUzGJRJreQ=";
   };
 
   nativeBuildInputs = [
@@ -43,10 +48,9 @@ buildPythonPackage rec {
   ];
 
   propagatedBuildInputs = [
-    appdirs
     attrs
     cattrs
-    exceptiongroup
+    platformdirs
     requests
     urllib3
     url-normalize
@@ -78,9 +82,15 @@ buildPythonPackage rec {
   };
 
   nativeCheckInputs = [
+    psutil
     pytestCheckHook
+    pytest-rerunfailures
+    pytest-xdist
     requests-mock
+    responses
     rich
+    tenacity
+    time-machine
     timeout-decorator
   ]
   ++ passthru.optional-dependencies.json
@@ -98,6 +108,9 @@ buildPythonPackage rec {
   disabledTests = [
     # Tests are flaky in the sandbox
     "test_remove_expired_responses"
+    # Tests that broke with urllib 2.0.5
+    "test_request_only_if_cached__stale_if_error__expired"
+    "test_stale_if_error__error_code"
   ];
 
   pythonImportsCheck = [