From 5b971598f0a928185d0d9b4f3bc4ffe024a62fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Tue, 27 Apr 2021 10:34:36 -0300 Subject: [PATCH] python3Packages.pytest-sanic: mark as broken with sanic >= 21.3.0 pytest-sanic is incompatible with the current version of Sanic, see sanic-org/sanic#2095 and yunstanford/pytest-sanic#50. While it is broken, we also need it to run Sanic's tests (for which case it works just fine). --- pkgs/development/python-modules/pytest-sanic/default.nix | 4 ++++ pkgs/top-level/python-packages.nix | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/pytest-sanic/default.nix b/pkgs/development/python-modules/pytest-sanic/default.nix index 84330cfd62e..ae1c56f95b7 100644 --- a/pkgs/development/python-modules/pytest-sanic/default.nix +++ b/pkgs/development/python-modules/pytest-sanic/default.nix @@ -46,5 +46,9 @@ buildPythonPackage rec { homepage = "https://github.com/yunstanford/pytest-sanic/"; license = licenses.asl20; maintainers = [ maintainers.costrouc ]; + # pytest-sanic is incompatible with Sanic 21.3, see + # https://github.com/sanic-org/sanic/issues/2095 and + # https://github.com/yunstanford/pytest-sanic/issues/50. + broken = lib.versionAtLeast sanic.version "21.3.0"; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 10c07d8d4b4..9c418635522 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7195,6 +7195,14 @@ in { samsungtvws = callPackage ../development/python-modules/samsungtvws { }; + sanic = callPackage ../development/python-modules/sanic { + # pytest-sanic is doing ok for the sole purpose of testing Sanic. + pytest-sanic = self.pytest-sanic.overridePythonAttrs (oldAttrs: { + doCheck = false; + meta.broken = false; + }); + }; + sanic-auth = callPackage ../development/python-modules/sanic-auth { }; sanic = callPackage ../development/python-modules/sanic { };