From d79b4037a352909445925a386be51b8e5548d712 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 13 Jan 2022 22:17:32 +0100 Subject: [PATCH 1/2] python3Packages.testfixtures: disable failing tests --- .../python-modules/testfixtures/default.nix | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/testfixtures/default.nix b/pkgs/development/python-modules/testfixtures/default.nix index 99be9957a5ef..b582bf4bc7f7 100644 --- a/pkgs/development/python-modules/testfixtures/default.nix +++ b/pkgs/development/python-modules/testfixtures/default.nix @@ -1,9 +1,10 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 , mock , pytestCheckHook +, pythonAtLeast +, pythonOlder , sybil , twisted , zope_component @@ -12,6 +13,9 @@ buildPythonPackage rec { pname = "testfixtures"; version = "6.18.3"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; @@ -19,29 +23,42 @@ buildPythonPackage rec { }; checkInputs = [ - pytestCheckHook mock + pytestCheckHook sybil - zope_component twisted + zope_component ]; - doCheck = !isPy27; - disabledTestPaths = [ # Django is too much hasle to setup at the moment "testfixtures/tests/test_django" ]; + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + # https://github.com/simplistix/testfixtures/issues/168 + "test_invalid_communicate_call" + "test_invalid_kill" + "test_invalid_parameters" + "test_invalid_poll" + "test_invalid_send_signal" + "test_invalid_terminate" + "test_invalid_wait_call" + "test_replace_delattr_cant_remove" + "test_replace_delattr_cant_remove_not_strict" + ]; + pytestFlagsArray = [ "testfixtures/tests" ]; - pythonImportsCheck = [ "testfixtures" ]; + pythonImportsCheck = [ + "testfixtures" + ]; meta = with lib; { + description = "Collection of helpers and mock objects for unit tests and doc tests"; homepage = "https://github.com/Simplistix/testfixtures"; - description = "A collection of helpers and mock objects for unit tests and doc tests"; license = licenses.mit; maintainers = with maintainers; [ siriobalmelli ]; }; From 6390150a0562aef42e7197760c98fc668cac0d7c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 14 Jan 2022 09:49:15 +0100 Subject: [PATCH 2/2] python3Packages.connexion: relax pyyaml and jsonschema constraint --- .../python-modules/connexion/default.nix | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/connexion/default.nix b/pkgs/development/python-modules/connexion/default.nix index ed6f2da5142f..bfe4fc221445 100644 --- a/pkgs/development/python-modules/connexion/default.nix +++ b/pkgs/development/python-modules/connexion/default.nix @@ -7,7 +7,6 @@ , clickclick , decorator , fetchFromGitHub -, fetchpatch , flask , inflection , jsonschema @@ -23,14 +22,16 @@ buildPythonPackage rec { pname = "connexion"; - version = "2.9.0"; + version = "2.10.0"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "zalando"; repo = pname; rev = version; - sha256 = "13smcg2w24zr2sv1968g9p9m6f18nqx688c96qdlmldnszgzf5ik"; + sha256 = "sha256-a1wj72XpjXvhWCxRLrGeDatS8a4ij9YAm9FGhTBq/i8="; }; propagatedBuildInputs = [ @@ -55,16 +56,20 @@ buildPythonPackage rec { testfixtures ]; - patches = [ - # No minor release for later versions, https://github.com/zalando/connexion/pull/1402 - (fetchpatch { - name = "allow-later-flask-and-werkzeug-releases.patch"; - url = "https://github.com/zalando/connexion/commit/4a225d554d915fca17829652b7cb8fe119e14b37.patch"; - sha256 = "0dys6ymvicpqa3p8269m4yv6nfp58prq3fk1gcx1z61h9kv84g1k"; - }) + postPatch = '' + substituteInPlace setup.py \ + --replace "PyYAML>=5.1,<6" "PyYAML>=5.1" \ + --replace "jsonschema>=2.5.1,<4" "jsonschema>=2.5.1" + ''; + + disabledTests = [ + # We have a later PyYAML release + "test_swagger_yaml" ]; - pythonImportsCheck = [ "connexion" ]; + pythonImportsCheck = [ + "connexion" + ]; meta = with lib; { description = "Swagger/OpenAPI First framework on top of Flask";