From 383f244dd5d217d1033cc9076c70fa3288f7cc18 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 May 2024 13:53:31 +0200 Subject: [PATCH 1/3] python312Packages.aiocoap: 0.4.7 -> 0.4.8 Diff: https://github.com/chrysn/aiocoap/compare/refs/tags/0.4.7...0.4.8 Changelog: https://github.com/chrysn/aiocoap/blob/0.4.8/NEWS --- pkgs/development/python-modules/aiocoap/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiocoap/default.nix b/pkgs/development/python-modules/aiocoap/default.nix index af2b220a21c2..cbc1c80258b5 100644 --- a/pkgs/development/python-modules/aiocoap/default.nix +++ b/pkgs/development/python-modules/aiocoap/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "aiocoap"; - version = "0.4.7"; + version = "0.4.8"; pyproject = true; disabled = pythonOlder "3.7"; @@ -33,7 +33,7 @@ buildPythonPackage rec { owner = "chrysn"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-4iwoPfmIwk+PlWUp60aqA5qZgzyj34pnZHf9uH5UhnY="; + hash = "sha256-jBRxorHr5/CgAR6WVXBUycZpJ6n1DYVFQk6kqVv8D1Q="; }; nativeBuildInputs = [ From 906e8df0324f541e30c56600debab2e1baa0569d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 May 2024 13:56:57 +0200 Subject: [PATCH 2/3] python312Packages.aiocoap: refactor --- .../python-modules/aiocoap/default.nix | 58 ++++++++----------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/pkgs/development/python-modules/aiocoap/default.nix b/pkgs/development/python-modules/aiocoap/default.nix index cbc1c80258b5..3d094802caf5 100644 --- a/pkgs/development/python-modules/aiocoap/default.nix +++ b/pkgs/development/python-modules/aiocoap/default.nix @@ -1,25 +1,19 @@ { lib , buildPythonPackage -, fetchFromGitHub -, pythonAtLeast -, pythonOlder - -# build-system -, setuptools - -# optionals -, cbor2 , cbor-diag +, cbor2 , cryptography +, dtlssocket +, fetchFromGitHub , filelock , ge25519 -, dtlssocket -, websockets -, termcolor , pygments - -# tests , pytestCheckHook +, pythonAtLeast +, pythonOlder +, setuptools +, termcolor +, websockets }: buildPythonPackage rec { @@ -31,12 +25,12 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "chrysn"; - repo = pname; + repo = "aiocoap"; rev = "refs/tags/${version}"; hash = "sha256-jBRxorHr5/CgAR6WVXBUycZpJ6n1DYVFQk6kqVv8D1Q="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; @@ -65,23 +59,6 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = lib.optionals (pythonAtLeast "3.12") [ - # https://github.com/chrysn/aiocoap/issues/339 - "--deselect=tests/test_server.py::TestServerTCP::test_big_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_empty_accept" - "--deselect=tests/test_server.py::TestServerTCP::test_error_resources" - "--deselect=tests/test_server.py::TestServerTCP::test_fast_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_js_accept" - "--deselect=tests/test_server.py::TestServerTCP::test_manualbig_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_nonexisting_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_replacing_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_root_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_slow_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_slowbig_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_spurious_resource" - "--deselect=tests/test_server.py::TestServerTCP::test_unacceptable_accept" - ]; - disabledTestPaths = [ # Don't test the plugins "tests/test_tls.py" @@ -92,6 +69,21 @@ buildPythonPackage rec { disabledTests = [ # Communication is not properly mocked "test_uri_parser" + ] ++ lib.optionals (pythonAtLeast "3.12") [ + # https://github.com/chrysn/aiocoap/issues/339 + "TestServerTCP::test_big_resource" + "TestServerTCP::test_empty_accept" + "TestServerTCP::test_error_resources" + "TestServerTCP::test_fast_resource" + "TestServerTCP::test_js_accept" + "TestServerTCP::test_manualbig_resource" + "TestServerTCP::test_nonexisting_resource" + "TestServerTCP::test_replacing_resource" + "TestServerTCP::test_root_resource" + "TestServerTCP::test_slow_resource" + "TestServerTCP::test_slowbig_resource" + "TestServerTCP::test_spurious_resource" + "TestServerTCP::test_unacceptable_accept" ]; pythonImportsCheck = [ From 2c4139d45ef00a7e174eeec9d0d1d0acd271affb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 May 2024 13:57:14 +0200 Subject: [PATCH 3/3] python312Packages.aiocoap: format with nixfmt --- .../python-modules/aiocoap/default.nix | 93 +++++++++---------- 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/pkgs/development/python-modules/aiocoap/default.nix b/pkgs/development/python-modules/aiocoap/default.nix index 3d094802caf5..5aff82034bcc 100644 --- a/pkgs/development/python-modules/aiocoap/default.nix +++ b/pkgs/development/python-modules/aiocoap/default.nix @@ -1,19 +1,20 @@ -{ lib -, buildPythonPackage -, cbor-diag -, cbor2 -, cryptography -, dtlssocket -, fetchFromGitHub -, filelock -, ge25519 -, pygments -, pytestCheckHook -, pythonAtLeast -, pythonOlder -, setuptools -, termcolor -, websockets +{ + lib, + buildPythonPackage, + cbor-diag, + cbor2, + cryptography, + dtlssocket, + fetchFromGitHub, + filelock, + ge25519, + pygments, + pytestCheckHook, + pythonAtLeast, + pythonOlder, + setuptools, + termcolor, + websockets, }: buildPythonPackage rec { @@ -30,9 +31,7 @@ buildPythonPackage rec { hash = "sha256-jBRxorHr5/CgAR6WVXBUycZpJ6n1DYVFQk6kqVv8D1Q="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; passthru.optional-dependencies = { oscore = [ @@ -41,12 +40,8 @@ buildPythonPackage rec { filelock ge25519 ]; - tinydtls = [ - dtlssocket - ]; - ws = [ - websockets - ]; + tinydtls = [ dtlssocket ]; + ws = [ websockets ]; prettyprint = [ termcolor cbor2 @@ -55,9 +50,7 @@ buildPythonPackage rec { ]; }; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; disabledTestPaths = [ # Don't test the plugins @@ -66,29 +59,29 @@ buildPythonPackage rec { "tests/test_oscore_plugtest.py" ]; - disabledTests = [ - # Communication is not properly mocked - "test_uri_parser" - ] ++ lib.optionals (pythonAtLeast "3.12") [ - # https://github.com/chrysn/aiocoap/issues/339 - "TestServerTCP::test_big_resource" - "TestServerTCP::test_empty_accept" - "TestServerTCP::test_error_resources" - "TestServerTCP::test_fast_resource" - "TestServerTCP::test_js_accept" - "TestServerTCP::test_manualbig_resource" - "TestServerTCP::test_nonexisting_resource" - "TestServerTCP::test_replacing_resource" - "TestServerTCP::test_root_resource" - "TestServerTCP::test_slow_resource" - "TestServerTCP::test_slowbig_resource" - "TestServerTCP::test_spurious_resource" - "TestServerTCP::test_unacceptable_accept" - ]; + disabledTests = + [ + # Communication is not properly mocked + "test_uri_parser" + ] + ++ lib.optionals (pythonAtLeast "3.12") [ + # https://github.com/chrysn/aiocoap/issues/339 + "TestServerTCP::test_big_resource" + "TestServerTCP::test_empty_accept" + "TestServerTCP::test_error_resources" + "TestServerTCP::test_fast_resource" + "TestServerTCP::test_js_accept" + "TestServerTCP::test_manualbig_resource" + "TestServerTCP::test_nonexisting_resource" + "TestServerTCP::test_replacing_resource" + "TestServerTCP::test_root_resource" + "TestServerTCP::test_slow_resource" + "TestServerTCP::test_slowbig_resource" + "TestServerTCP::test_spurious_resource" + "TestServerTCP::test_unacceptable_accept" + ]; - pythonImportsCheck = [ - "aiocoap" - ]; + pythonImportsCheck = [ "aiocoap" ]; meta = with lib; { description = "Python CoAP library";