python310Packages.cachecontrol: Fix tests with requests 2.29.0

Use the HTTPResponse from urllib3 directly, because requests stopped
importing it.
This commit is contained in:
Martin Weinelt 2023-05-12 12:39:15 +02:00
parent 0a82cd9e62
commit 4b9439314a
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -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