From 429d234f636b5122fa5173e5f35b0e6c83eeec7c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 24 Jul 2022 14:12:44 +0200 Subject: [PATCH 1/5] python3Packages.uvicorn: fix dependencies --- pkgs/development/python-modules/uvicorn/default.nix | 13 +++++++------ pkgs/development/python-modules/uvicorn/tests.nix | 11 ++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index e8b2520393ca..26d23f08afa4 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -9,9 +9,8 @@ , pyyaml , typing-extensions , uvloop -, watchgod +, watchfiles , websockets -, wsproto , pythonOlder }: @@ -35,15 +34,17 @@ buildPythonPackage rec { propagatedBuildInputs = [ click h11 + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions + ]; + + passthru.optional-dependencies.standard = [ httptools python-dotenv pyyaml uvloop - watchgod + watchfiles websockets - wsproto - ] ++ lib.optionals (pythonOlder "3.8") [ - typing-extensions ]; postInstall = '' diff --git a/pkgs/development/python-modules/uvicorn/tests.nix b/pkgs/development/python-modules/uvicorn/tests.nix index 2fc0e932b8e9..b9cd883f43c0 100644 --- a/pkgs/development/python-modules/uvicorn/tests.nix +++ b/pkgs/development/python-modules/uvicorn/tests.nix @@ -1,5 +1,6 @@ { stdenv , buildPythonPackage +, asgiref , uvicorn , httpx , pytest-asyncio @@ -7,6 +8,8 @@ , pytest-mock , requests , trustme +, watchgod +, wsproto }: buildPythonPackage rec { @@ -19,6 +22,7 @@ buildPythonPackage rec { dontInstall = true; checkInputs = [ + asgiref uvicorn httpx pytestCheckHook @@ -26,7 +30,12 @@ buildPythonPackage rec { pytest-mock requests trustme - ]; + + # strictly optional dependencies + watchgod + wsproto + ] + ++ uvicorn.optional-dependencies.standard; doCheck = !stdenv.isDarwin; From 6d0715f340a3d7430a6454e445719bb26582a0bd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 24 Jul 2022 14:20:15 +0200 Subject: [PATCH 2/5] prometheus-dmarc-exporter: 0.6.0 -> 0.6.1 Signed-off-by: Martin Weinelt --- .../prometheus/dmarc-metrics-exporter/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix index 2ec89972a65a..46e81508b4d2 100644 --- a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix +++ b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix @@ -4,7 +4,7 @@ python3.pkgs.buildPythonApplication rec { pname = "dmarc-metrics-exporter"; - version = "0.6.0"; + version = "0.6.1"; disabled = python3.pythonOlder "3.7"; @@ -12,11 +12,12 @@ python3.pkgs.buildPythonApplication rec { src = python3.pkgs.fetchPypi { inherit pname version; - sha256 = "70f39b373ead42acb8caf56040f7ebf13ab67aea505511025c09ecf4560f8b1b"; + hash = "sha256-VYmSHDde3zLq7NcsX7xp1JYe6x6RKFEravpakIzW390="; }; postPatch = '' substituteInPlace pyproject.toml \ + --replace 'uvicorn = {extras = ["standard"], version = "^0.15.0"}' 'uvicorn = {version = "^0.15.0"}' \ --replace '"^' '">=' ''; @@ -31,7 +32,8 @@ python3.pkgs.buildPythonApplication rec { typing-extensions uvicorn xsdata - ]; + ] + ++ uvicorn.optional-dependencies.standard; checkInputs = with python3.pkgs; [ aiohttp From dde3e1ae3b5abf6d3aea91852fa664de4dc63f6d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 24 Jul 2022 15:31:35 +0200 Subject: [PATCH 3/5] python3Packages.jupyterlab_server: fix build --- .../python-modules/jupyterlab_server/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/development/python-modules/jupyterlab_server/default.nix b/pkgs/development/python-modules/jupyterlab_server/default.nix index 3c9636ed7524..62730df149ea 100644 --- a/pkgs/development/python-modules/jupyterlab_server/default.nix +++ b/pkgs/development/python-modules/jupyterlab_server/default.nix @@ -2,6 +2,7 @@ , lib , buildPythonPackage , fetchPypi +, hatchling , jsonschema , pythonOlder , requests @@ -10,6 +11,7 @@ , babel , jupyter_server , openapi-core +, pytest-timeout , pytest-tornasync , ruamel-yaml , strict-rfc3339 @@ -18,6 +20,7 @@ buildPythonPackage rec { pname = "jupyterlab_server"; version = "2.15.0"; + format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { @@ -33,11 +36,16 @@ buildPythonPackage rec { rm -r tests/translations/ ''; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ requests jsonschema pyjson5 babel jupyter_server ]; checkInputs = [ openapi-core pytestCheckHook + pytest-timeout pytest-tornasync ruamel-yaml ]; @@ -46,6 +54,11 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; + pytestFlagsArray = [ + # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives + "-W ignore::DeprecationWarning" + ]; + __darwinAllowLocalNetworking = true; meta = with lib; { From 90e512742c0176089be286b917045508116e682b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 25 Jul 2022 00:44:40 +0200 Subject: [PATCH 4/5] python3Packages.pyprosegur: propagate aiofiles --- pkgs/development/python-modules/pyprosegur/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pyprosegur/default.nix b/pkgs/development/python-modules/pyprosegur/default.nix index e6d3be82c2c1..d26f7fdd9e42 100644 --- a/pkgs/development/python-modules/pyprosegur/default.nix +++ b/pkgs/development/python-modules/pyprosegur/default.nix @@ -1,4 +1,5 @@ { lib +, aiofiles , aiohttp , backoff , buildPythonPackage @@ -20,6 +21,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ + aiofiles aiohttp backoff click From 13981cabc607b7cf72e7891ae613a6072d229684 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 25 Jul 2022 01:02:21 +0200 Subject: [PATCH 5/5] python3.pkgs.pypdf2: 2.5.0 -> 2.8.0 --- pkgs/development/python-modules/pypdf2/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pypdf2/default.nix b/pkgs/development/python-modules/pypdf2/default.nix index 8eb24dbe3385..c5c271c46276 100644 --- a/pkgs/development/python-modules/pypdf2/default.nix +++ b/pkgs/development/python-modules/pypdf2/default.nix @@ -1,29 +1,35 @@ { lib , buildPythonPackage , fetchPypi +, pythonOlder , glibcLocales +, typing-extensions , python , isPy3k }: buildPythonPackage rec { pname = "PyPDF2"; - version = "2.5.0"; + version = "2.8.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-WAKx9A+nm+G1q57claTn9+czmVidtPDmbKgx9Ennos0="; + sha256 = "sha256-ad39ck3f4HAQ7zpWyVvxIYVT7Anig2Nuzw8HLsEZWZo="; }; LC_ALL = "en_US.UTF-8"; buildInputs = [ glibcLocales ]; + propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ + typing-extensions + ]; + checkPhase = '' - ${python.interpreter} -m unittest discover -s Tests + ${python.interpreter} -m unittest discover ''; # Tests broken on Python 3.x - doCheck = !(isPy3k); + #doCheck = !(isPy3k); meta = with lib; { description = "A Pure-Python library built as a PDF toolkit";