From a110fdf216637bc27d3787745e4055d4a3c3e46f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 11 Mar 2019 16:35:07 -0700 Subject: [PATCH 1/3] python37Packages.zeep: 3.2.0 -> 3.3.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-zeep/versions --- pkgs/development/python-modules/zeep/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/zeep/default.nix b/pkgs/development/python-modules/zeep/default.nix index c4d9222e817..45e9fc01def 100644 --- a/pkgs/development/python-modules/zeep/default.nix +++ b/pkgs/development/python-modules/zeep/default.nix @@ -25,11 +25,11 @@ buildPythonPackage rec { pname = "zeep"; - version = "3.2.0"; + version = "3.3.0"; src = fetchPypi { inherit pname version; - sha256 = "0bfpdy3hi8aa45piwg5gj0xxa187v13d66qr1ki73qn7c6rbizp5"; + sha256 = "144dk7gw93l4amrwmp5vzxxkcjsgkx6fjqzvsawx2iap23j605j9"; }; propagatedBuildInputs = [ From 8b4269bc1e167a3a69e9fb28724d25d02d127efb Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Sat, 23 Mar 2019 10:03:13 +1000 Subject: [PATCH 2/3] pythonPackages.aioresponses: init at 0.6.0 --- .../python-modules/aioresponses/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/aioresponses/default.nix diff --git a/pkgs/development/python-modules/aioresponses/default.nix b/pkgs/development/python-modules/aioresponses/default.nix new file mode 100644 index 00000000000..55120ad5803 --- /dev/null +++ b/pkgs/development/python-modules/aioresponses/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pbr +, aiohttp +, ddt +, asynctest +, pytest +}: + +buildPythonPackage rec { + pname = "aioresponses"; + version = "0.6.0"; + disabled = pythonOlder "3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0ii1jiwb8qa2y8cqa1zqn7mjax9l8bpf16k4clv616mxw1l0bvs6"; + }; + + nativeBuildInputs = [ + pbr + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + asynctest + ddt + pytest + ]; + + # Skip a test which makes requests to httpbin.org + checkPhase = '' + pytest -k "not test_address_as_instance_of_url_combined_with_pass_through" + ''; + + meta = { + description = "A helper to mock/fake web requests in python aiohttp package"; + homepage = https://github.com/pnuckowski/aioresponses; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ rvl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d3ec3961f7e..b9bc41f381d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -921,6 +921,8 @@ in { aioprocessing = callPackage ../development/python-modules/aioprocessing { }; + aioresponses = callPackage ../development/python-modules/aioresponses { }; + aiorpcx = callPackage ../development/python-modules/aiorpcx { }; aiounifi = callPackage ../development/python-modules/aiounifi { }; From b716b4d7324a215c4f65e9b0ceb64e7124bbb73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 11 Apr 2019 18:17:31 +0200 Subject: [PATCH 3/3] python.pkgs.zeep: enable tests for python3 --- .../python-modules/zeep/default.nix | 55 ++++++------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/pkgs/development/python-modules/zeep/default.nix b/pkgs/development/python-modules/zeep/default.nix index 45e9fc01def..0513183d484 100644 --- a/pkgs/development/python-modules/zeep/default.nix +++ b/pkgs/development/python-modules/zeep/default.nix @@ -1,26 +1,27 @@ { fetchPypi , lib , buildPythonPackage -, python , isPy3k , appdirs +, attrs , cached-property , defusedxml , isodate , lxml -, pytz +, requests , requests_toolbelt , six +, pytz +, tornado +, aiohttp # test dependencies , freezegun , mock -, nose , pretend -, pytest +, pytest_3 , pytestcov , requests-mock -, tornado -, attrs +, aioresponses }: buildPythonPackage rec { @@ -33,56 +34,34 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - attrs appdirs + attrs cached-property defusedxml isodate lxml - pytz + requests requests_toolbelt six - ]; + pytz - # testtools dependency not supported for py3k - doCheck = !isPy3k; + # optional requirements + tornado + ] ++ lib.optional isPy3k aiohttp; checkInputs = [ - tornado - ]; - - buildInputs = if isPy3k then [] else [ freezegun mock - nose pretend - pytest pytestcov + pytest_3 requests-mock - ]; - - patchPhase = '' - # remove overly strict bounds and lint requirements - sed -e "s/freezegun==.*'/freezegun'/" \ - -e "s/pytest-cov==.*'/pytest-cov'/" \ - -e "s/'isort.*//" \ - -e "s/'flake8.*//" \ - -i setup.py - - # locale.preferredencoding() != 'utf-8' - sed -e "s/xsd', 'r')/xsd', 'r', encoding='utf-8')/" -i tests/*.py - - # cache defaults to home directory, which doesn't exist - sed -e "s|SqliteCache()|SqliteCache(path='./zeeptest.db')|" \ - -i tests/test_transports.py - - # requires xmlsec python module - rm tests/test_wsse_signature.py - ''; + ] ++ lib.optional isPy3k aioresponses; checkPhase = '' runHook preCheck - ${python.interpreter} -m pytest tests + # ignored tests requires xmlsec python module + HOME=$(mktemp -d) pytest tests --ignore tests/test_wsse_signature.py runHook postCheck '';