streamlink: patch tests for compatibility with Requests 2.26

This commit is contained in:
D Anzorge 2021-09-17 01:06:25 +02:00
parent 610ceb54e3
commit 299d4d7296

View file

@ -2,6 +2,7 @@
, python3Packages
, rtmpdump
, ffmpeg
, fetchpatch
}:
python3Packages.buildPythonApplication rec {
@ -33,11 +34,14 @@ python3Packages.buildPythonApplication rec {
ffmpeg
];
# note that upstream currently uses requests 2.25.1 in Windows builds
postPatch = ''
substituteInPlace setup.py \
--replace 'requests>=2.26.0,<3.0' 'requests'
'';
patches = [
# Patch failing tests to expect correct Accept-Encoding as generated by Requests
(fetchpatch {
url = "https://github.com/streamlink/streamlink/commit/ae747a113199c119bced4613d33edcc67a222bb9.patch";
includes = [ "tests/test_stream_json.py" ];
sha256 = "sha256-KEgyWdh5DNgNktmLSvKQowUQO9p9Q7zP4NbCQJPNgKw=";
})
];
meta = with lib; {
homepage = "https://streamlink.github.io/";