From 5cd67130facd495fadb3ecee37d363ca5566e34c Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Fri, 1 Aug 2025 04:09:41 -0600 Subject: [PATCH] python3Packages.granian: 2.3.4 -> 2.5.0 https://github.com/emmett-framework/granian/releases/tag/v2.5.0 Diff: https://github.com/emmett-framework/granian/compare/v2.3.4...v2.5.0 --- .../python-modules/granian/default.nix | 6 ++-- .../python-modules/granian/no-alloc.patch | 35 +++++++++---------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/granian/default.nix b/pkgs/development/python-modules/granian/default.nix index 572c8e0791b5..4460f3a562f3 100644 --- a/pkgs/development/python-modules/granian/default.nix +++ b/pkgs/development/python-modules/granian/default.nix @@ -19,14 +19,14 @@ buildPythonPackage rec { pname = "granian"; - version = "2.3.4"; + version = "2.5.0"; pyproject = true; src = fetchFromGitHub { owner = "emmett-framework"; repo = "granian"; tag = "v${version}"; - hash = "sha256-PoNHpxumBdVllfpbVMYDV8KnDqIDP+XQcrkvs6tdNKg="; + hash = "sha256-Ce0e31pjQEHHNz0Q13jshPBqxZdgAomGT3dpYm+ruQE="; }; # Granian forces a custom allocator for all the things it runs, @@ -39,7 +39,7 @@ buildPythonPackage rec { cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; - hash = "sha256-0tEYewojStfXRrcI8LVR1T7c5EETkYXVfClsHCUNPrM="; + hash = "sha256-QdoGxNMhBltzzAQIQt+Y5M4WRBtbdwm907jHlh1IxeQ="; }; nativeBuildInputs = with rustPlatform; [ diff --git a/pkgs/development/python-modules/granian/no-alloc.patch b/pkgs/development/python-modules/granian/no-alloc.patch index d3dc138fb293..1d0b4456a828 100644 --- a/pkgs/development/python-modules/granian/no-alloc.patch +++ b/pkgs/development/python-modules/granian/no-alloc.patch @@ -1,8 +1,8 @@ diff --git a/Cargo.toml b/Cargo.toml -index 4e6676f..1657d61 100644 +index cbf1cdb..e819e14 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -40,7 +40,6 @@ hyper = { version = "=1.6", features = ["http1", "http2", "server"] } +@@ -41,7 +41,6 @@ hyper = { version = "=1.6", features = ["http1", "http2", "server"] } hyper-util = { version = "=0.1", features = ["server-auto", "tokio"] } itertools = "0.14" log = "0.4" @@ -10,38 +10,35 @@ index 4e6676f..1657d61 100644 mime_guess = "=2.0" pem = "=3.0" percent-encoding = "=2.3" -@@ -56,15 +55,9 @@ tokio-stream = "0.1" - tokio-tungstenite = "=0.26" - tokio-util = { version = "0.7", features = ["codec", "rt"] } - --[target.'cfg(not(any(target_env = "musl", target_os = "freebsd", target_os = "openbsd", target_os = "windows")))'.dependencies] --tikv-jemallocator = { version = "0.6.0", default-features = false, features = ["disable_initial_exec_tls"] } -- +@@ -52,7 +51,6 @@ pyo3-log = "=0.12" + rustls-pemfile = "2.2" + socket2 = { version = "=0.6", features = ["all"] } + sysinfo = "=0.36" +-tikv-jemallocator = { version = "0.6.0", default-features = false, features = ["disable_initial_exec_tls"], optional = true } + tls-listener = { version = "=0.11", features = ["rustls-ring"] } + tokio = { version = "1.45", features = ["full"] } + tokio-stream = "0.1" +@@ -62,10 +60,6 @@ tokio-util = { version = "0.7", features = ["codec", "rt"] } [build-dependencies] pyo3-build-config = "=0.25" -[features] +-jemalloc = ["dep:tikv-jemallocator"] -mimalloc = ["dep:mimalloc"] - [profile.release] codegen-units = 1 debug = false diff --git a/src/lib.rs b/src/lib.rs -index 9172842..6c41005 100644 +index a17a7e5..8ea1a4d 100644 --- a/src/lib.rs +++ b/src/lib.rs -@@ -1,17 +1,3 @@ --#[cfg(not(any( -- target_env = "musl", -- target_os = "freebsd", -- target_os = "openbsd", -- target_os = "windows", -- feature = "mimalloc" --)))] +@@ -1,11 +1,3 @@ +-#[cfg(all(feature = "jemalloc", not(feature = "mimalloc")))] -#[global_allocator] -static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; - --#[cfg(feature = "mimalloc")] +-#[cfg(all(feature = "mimalloc", not(feature = "jemalloc")))] -#[global_allocator] -static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; -