From 7da7101972f6de63abfbd19e42fe68af1be6bfd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 12 Nov 2025 18:58:17 -0800 Subject: [PATCH] python3Packages.directv: replace async-timeout with asyncio.timeout --- .../development/python-modules/directv/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/directv/default.nix b/pkgs/development/python-modules/directv/default.nix index dfc205beb077..3baaef43be4e 100644 --- a/pkgs/development/python-modules/directv/default.nix +++ b/pkgs/development/python-modules/directv/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch, setuptools, aiohttp, yarl, @@ -22,11 +23,14 @@ buildPythonPackage rec { hash = "sha256-s4bE8ACFCfpNq+HGEO8fv3VCGPI4OOdR5A7RjY2bTKY="; }; - postPatch = '' - # TypeError: 'Timeout' object does not support the context manager protocol - substituteInPlace directv/directv.py \ - --replace-fail "with async_timeout.timeout" "async with async_timeout.timeout" - ''; + patches = [ + # https://github.com/ctalkington/python-directv/pull/365 + (fetchpatch { + name = "replace-async-timeout-with-asyncio.timeout.patch"; + url = "https://github.com/ctalkington/python-directv/commit/a161454b09e144de15883d25378fbb13069e241b.patch"; + hash = "sha256-jI+ALoQ0EDUQCSQp90SE+e3sGMWLwojNtLevAbgoScc="; + }) + ]; build-system = [ setuptools ];