From 61e1e472700241628b47617a7879860334156c57 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 21 Jan 2025 13:55:33 +0200 Subject: [PATCH] python3.pkgs.w3lib: fix build with python 3.9 and 3.10 The fix for python/cpython#103848 / CVE-2024-11168 also got backported to python 3.9.21 and 3.10.16, which is why the testsuite started failing. (cherry picked from commit e7b341065ec07a31ee89afeaf4f2ac0225514f60) --- pkgs/development/python-modules/w3lib/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/w3lib/default.nix b/pkgs/development/python-modules/w3lib/default.nix index 96314e37ca7cb..99a336319abc6 100644 --- a/pkgs/development/python-modules/w3lib/default.nix +++ b/pkgs/development/python-modules/w3lib/default.nix @@ -1,6 +1,7 @@ { lib, buildPythonPackage, + fetchpatch, fetchPypi, pytestCheckHook, pythonOlder, @@ -19,6 +20,13 @@ buildPythonPackage rec { hash = "sha256-dW/y2Uxk5ByNfAxZ/qEqXQvFXjOlMceYi0oWPeubB90="; }; + patches = [ + (fetchpatch { + url = "https://github.com/scrapy/w3lib/commit/44dcf9160c3f207658d6ce808307c80c9ca835a2.patch"; + hash = "sha256-fUQ2oWpAJeslgemt+EUxKLH3Ywpg441FCOBLFJCZ+Ac="; + }) + ]; + build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ];