From 515b0b158cfde071b6b9f89964cf3510043f9404 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 8 Jun 2021 10:53:19 +0200 Subject: [PATCH] python3Packages.sanic-testing: 0.3.1 -> 0.4.0 --- .../python-modules/sanic-testing/default.nix | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/sanic-testing/default.nix b/pkgs/development/python-modules/sanic-testing/default.nix index e5194e36bd23..71af4a0a1170 100644 --- a/pkgs/development/python-modules/sanic-testing/default.nix +++ b/pkgs/development/python-modules/sanic-testing/default.nix @@ -2,7 +2,6 @@ , buildPythonPackage , fetchFromGitHub , pytestCheckHook -, httpcore , httpx , pytest-asyncio , sanic @@ -11,22 +10,31 @@ buildPythonPackage rec { pname = "sanic-testing"; - version = "0.3.1"; + version = "0.4.0"; src = fetchFromGitHub { owner = "sanic-org"; repo = "sanic-testing"; rev = "v${version}"; - hash = "sha256-hBAq+/BKs0a01M89Nb8HaClqxB+W5PTfjVzef/m9SWs="; + sha256 = "0li984imqmqc001iw4m4b6cqik3d9nb4b3yvamvbwkb6hgd94sck"; }; - postPatch = '' - substituteInPlace setup.py \ - --replace 'httpx>=0.16, <0.18' 'httpx' \ - --replace 'httpcore==0.12.*' 'httpcore' - ''; + propagatedBuildInputs = [ + httpx + sanic + websockets + ]; - propagatedBuildInputs = [ httpx sanic websockets httpcore ]; + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # https://github.com/sanic-org/sanic-testing/issues/19 + substituteInPlace setup.py \ + --replace '"websockets==8.1",' '"websockets>=9.1",' + ''; # `sanic` is explicitly set to null when building `sanic` itself # to prevent infinite recursion. In that case we skip running @@ -34,7 +42,6 @@ buildPythonPackage rec { doCheck = sanic != null; dontUsePythonImportsCheck = sanic == null; - checkInputs = [ pytestCheckHook pytest-asyncio ]; pythonImportsCheck = [ "sanic_testing" ]; meta = with lib; {