From 5fa6fba16f3898e1e61868b119ef079b49fa1281 Mon Sep 17 00:00:00 2001
From: Palmer Cox
Date: Thu, 16 Jan 2025 01:38:24 -0500
Subject: [PATCH] python3Packages.hypercorn: 0.16.0 -> 0.17.3
https://github.com/pgjones/hypercorn/blob/0.17.3/CHANGELOG.rs
Co-Authored-By: Martin Weinelt
---
.../python-modules/hypercorn/default.nix | 29 ++++++++++++-------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/pkgs/development/python-modules/hypercorn/default.nix b/pkgs/development/python-modules/hypercorn/default.nix
index 2ac0cb8e381aa..26c134aa5e303 100644
--- a/pkgs/development/python-modules/hypercorn/default.nix
+++ b/pkgs/development/python-modules/hypercorn/default.nix
@@ -3,10 +3,13 @@
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
- exceptiongroup,
+ aioquic,
h11,
h2,
+ httpx,
priority,
+ trio,
+ uvloop,
wsproto,
poetry-core,
pytest-asyncio,
@@ -16,16 +19,16 @@
buildPythonPackage rec {
pname = "hypercorn";
- version = "0.16.0";
- format = "pyproject";
+ version = "0.17.3";
+ pyproject = true;
disabled = pythonOlder "3.11"; # missing taskgroup dependency
src = fetchFromGitHub {
owner = "pgjones";
repo = "Hypercorn";
- rev = version;
- hash = "sha256-pIUZCQmC3c6FiV0iMMwJGs9TMi6B/YM+vaSx//sAmKE=";
+ tag = version;
+ hash = "sha256-AtSMURz1rOr6VTQ7L2EQ4XZeKVEGTPXTbs3u7IhnZo8";
};
postPatch = ''
@@ -35,27 +38,31 @@ buildPythonPackage rec {
build-system = [ poetry-core ];
dependencies = [
- exceptiongroup
h11
h2
priority
wsproto
];
+ optional-dependencies = {
+ h3 = [ aioquic ];
+ trio = [ trio ];
+ uvloop = [ uvloop ];
+ };
+
nativeCheckInputs = [
+ httpx
pytest-asyncio
pytest-trio
pytestCheckHook
- ];
+ ] ++ lib.flatten (lib.attrValues optional-dependencies);
- disabledTests = [
- # https://github.com/pgjones/hypercorn/issues/217
- "test_startup_failure"
- ];
+ __darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "hypercorn" ];
meta = with lib; {
+ changelog = "https://github.com/pgjones/hypercorn/blob/${src.tag}/CHANGELOG.rst";
homepage = "https://github.com/pgjones/hypercorn";
description = "ASGI web server inspired by Gunicorn";
mainProgram = "hypercorn";