From 128ebf865db05982f0803538e9da84b8f453cae8 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Wed, 30 Aug 2023 07:10:31 -0700 Subject: [PATCH] python311Packages.aioredis: fetch patch for python 3.11 compatibility --- .../python-modules/aioredis/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aioredis/default.nix b/pkgs/development/python-modules/aioredis/default.nix index 5ea482278944..2c944600ef91 100644 --- a/pkgs/development/python-modules/aioredis/default.nix +++ b/pkgs/development/python-modules/aioredis/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, fetchpatch , fetchPypi , async-timeout , typing-extensions @@ -11,14 +12,25 @@ buildPythonPackage rec { pname = "aioredis"; version = "2.0.1"; + format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "eaa51aaf993f2d71f54b70527c440437ba65340588afeb786cd87c55c89cd98e"; + hash = "sha256-6qUar5k/LXH1S3BSfEQEN7plNAWIr+t4bNh8Vcic2Y4="; }; + patches = [ + # https://github.com/aio-libs-abandoned/aioredis-py/pull/1490 + (fetchpatch { + name = "python-3.11-compatibility.patch"; + url = "https://github.com/aio-libs-abandoned/aioredis-py/commit/1b951502dc8f149fa66beafeea40c782f1c5c1d3.patch"; + hash = "sha256-EqkiYktxISg0Rv4ShXOksGvuUyljPxjJsfNOVaaax2o="; + includes = [ "aioredis/exceptions.py" ]; + }) + ]; + propagatedBuildInputs = [ async-timeout typing-extensions @@ -29,7 +41,7 @@ buildPythonPackage rec { meta = with lib; { description = "Asyncio (PEP 3156) Redis client library"; - homepage = "https://github.com/aio-libs/aioredis"; + homepage = "https://github.com/aio-libs-abandoned/aioredis-py"; license = licenses.mit; maintainers = with maintainers; [ mmai ]; };