about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/starlette/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/starlette/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/starlette/default.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/starlette/default.nix b/nixpkgs/pkgs/development/python-modules/starlette/default.nix
index 4f248044cc7f..6ea82d9b02a2 100644
--- a/nixpkgs/pkgs/development/python-modules/starlette/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/starlette/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, fetchPypi
 
 # build-system
 , hatchling
@@ -17,6 +18,7 @@
 , httpx
 
 # tests
+, pytest
 , pytestCheckHook
 , pythonOlder
 , trio
@@ -27,16 +29,16 @@
 
 buildPythonPackage rec {
   pname = "starlette";
-  version = "0.35.1";
+  version = "0.37.1";
   pyproject = true;
 
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "encode";
-    repo = pname;
+    repo = "starlette";
     rev = "refs/tags/${version}";
-    hash = "sha256-ynT1KowVJ1QdKLSOXYWVe5Q/PrYEWQDUbj395ebfk6Y=";
+    hash = "sha256-SJdBss1WKC30oulVTYUwUAJ8WM0KF5xbn/gvV97WM2g=";
   };
 
   nativeBuildInputs = [
@@ -58,7 +60,18 @@ buildPythonPackage rec {
   ];
 
   nativeCheckInputs = [
-    pytestCheckHook
+    (pytestCheckHook.override {
+      # pytest 8 changes warning message
+      # see https://github.com/encode/starlette/commit/8da52c2243b8855426c40c16ae24b27734824078
+      pytest = pytest.overridePythonAttrs (old: rec {
+        version = "8.1.0";
+        src = fetchPypi {
+          pname = "pytest";
+          inherit version;
+          hash = "sha256-+PoEq4+Y0YUROuYOptecIvgUOxS8HK7O1EoKuESSgyM=";
+        };
+      });
+    })
     trio
     typing-extensions
   ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
@@ -77,7 +90,7 @@ buildPythonPackage rec {
   };
 
   meta = with lib; {
-    changelog = "https://github.com/encode/starlette/releases/tag/${version}";
+    changelog = "https://www.starlette.io/release-notes/#${lib.replaceStrings [ "." ] [ "" ] version}";
     downloadPage = "https://github.com/encode/starlette";
     homepage = "https://www.starlette.io/";
     description = "The little ASGI framework that shines";