Skip to content

Commit d33d41b

Browse files
authored
python3Packages.directv: replace async-timeout with asyncio.timeout (#461127)
2 parents 5828df4 + 7da7101 commit d33d41b

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

pkgs/development/python-modules/directv/default.nix

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5+
fetchpatch,
56
setuptools,
67
aiohttp,
78
yarl,
@@ -22,11 +23,14 @@ buildPythonPackage rec {
2223
hash = "sha256-s4bE8ACFCfpNq+HGEO8fv3VCGPI4OOdR5A7RjY2bTKY=";
2324
};
2425

25-
postPatch = ''
26-
# TypeError: 'Timeout' object does not support the context manager protocol
27-
substituteInPlace directv/directv.py \
28-
--replace-fail "with async_timeout.timeout" "async with async_timeout.timeout"
29-
'';
26+
patches = [
27+
# https://github.com/ctalkington/python-directv/pull/365
28+
(fetchpatch {
29+
name = "replace-async-timeout-with-asyncio.timeout.patch";
30+
url = "https://github.com/ctalkington/python-directv/commit/a161454b09e144de15883d25378fbb13069e241b.patch";
31+
hash = "sha256-jI+ALoQ0EDUQCSQp90SE+e3sGMWLwojNtLevAbgoScc=";
32+
})
33+
];
3034

3135
build-system = [ setuptools ];
3236

0 commit comments

Comments
 (0)