From 4b9439314a8f25f142cdf161aa0068c202ddb694 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 12 May 2023 12:39:15 +0200 Subject: [PATCH] python310Packages.cachecontrol: Fix tests with requests 2.29.0 Use the HTTPResponse from urllib3 directly, because requests stopped importing it. --- pkgs/development/python-modules/cachecontrol/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/cachecontrol/default.nix b/pkgs/development/python-modules/cachecontrol/default.nix index bbe531015778..225ee7efd010 100644 --- a/pkgs/development/python-modules/cachecontrol/default.nix +++ b/pkgs/development/python-modules/cachecontrol/default.nix @@ -27,6 +27,13 @@ buildPythonPackage rec { hash = "sha256-uUPIQz/n347Q9G7NDOGuB760B/KxOglUxiS/rYjt5Po="; }; + postPatch = '' + # https://github.com/ionrock/cachecontrol/issues/297 + substituteInPlace tests/test_etag.py --replace \ + "requests.adapters.HTTPResponse.from_httplib" \ + "urllib3.response.HTTPResponse.from_httplib" + ''; + propagatedBuildInputs = [ msgpack requests