From 4594fc201d192b94839597b66fd40bc8e0223cf1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 24 Mar 2024 22:57:37 +0000 Subject: [PATCH 1/5] python311Packages.asyncstdlib: 3.12.1 -> 3.12.2 --- pkgs/development/python-modules/asyncstdlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/asyncstdlib/default.nix b/pkgs/development/python-modules/asyncstdlib/default.nix index 57306bd01a4d..3833c868f9c8 100644 --- a/pkgs/development/python-modules/asyncstdlib/default.nix +++ b/pkgs/development/python-modules/asyncstdlib/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "asyncstdlib"; - version = "3.12.1"; + version = "3.12.2"; pyproject = true; disabled = pythonOlder "3.9"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "maxfischer2781"; repo = "asyncstdlib"; rev = "refs/tags/v${version}"; - hash = "sha256-F7jS2EHiq+gK4a6+wJ8CA2YvwR37PP3yvbsLp3uE8R8="; + hash = "sha256-5DQM8m3aeCZAXOi+Rm+iM409juBBYdZDNqBAbhyTm/M="; }; nativeBuildInputs = [ From 5a21935c78689b53b35f08732f3c4525df6b2403 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 27 Mar 2024 09:35:44 +0100 Subject: [PATCH 2/5] python311Packages.asyncstdlib: refactor --- pkgs/development/python-modules/asyncstdlib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/asyncstdlib/default.nix b/pkgs/development/python-modules/asyncstdlib/default.nix index 3833c868f9c8..c31beceb1496 100644 --- a/pkgs/development/python-modules/asyncstdlib/default.nix +++ b/pkgs/development/python-modules/asyncstdlib/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { hash = "sha256-5DQM8m3aeCZAXOi+Rm+iM409juBBYdZDNqBAbhyTm/M="; }; - nativeBuildInputs = [ + build-system = [ flit-core ]; From 9f3532635a8add3abc1eb746f07b4573be088cb7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Mar 2024 09:07:27 +0100 Subject: [PATCH 3/5] python312Packages.deal: refactor --- .../python-modules/deal/default.nix | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/deal/default.nix b/pkgs/development/python-modules/deal/default.nix index b24d8be44826..faaeda80bc8b 100644 --- a/pkgs/development/python-modules/deal/default.nix +++ b/pkgs/development/python-modules/deal/default.nix @@ -1,31 +1,31 @@ { lib +, astroid , buildPythonPackage -, pythonOlder +, deal-solver +, docstring-parser , fetchFromGitHub , flit-core -, astroid -, pytestCheckHook -, docstring-parser -, marshmallow -, sphinx , hypothesis -, vaa -, deal-solver +, marshmallow , pygments +, pytestCheckHook +, pythonOlder +, sphinx , typeguard , urllib3 -, flake8 +, vaa }: buildPythonPackage rec { pname = "deal"; version = "4.24.3"; - format = "pyproject"; + pyproject = true; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "life4"; - repo = pname; + repo = "deal"; rev = "refs/tags/${version}"; hash = "sha256-QlM3d/jmg6v3L3D45+cgcCej71U1dl4uZ6sAYGGm3tU="; }; @@ -33,17 +33,17 @@ buildPythonPackage rec { postPatch = '' # don't do coverage substituteInPlace pyproject.toml \ - --replace "\"--cov-fail-under=100\"," "" \ - --replace "\"--cov=deal\"," "" \ - --replace "\"--cov-report=html\"," "" \ - --replace "\"--cov-report=term-missing:skip-covered\"," "" + --replace-fail '"--cov-fail-under=100",' "" \ + --replace-fail '"--cov=deal",' "" \ + --replace-fail '"--cov-report=html",' "" \ + --replace-fail '"--cov-report=term-missing:skip-covered",' "" ''; - nativeBuildInputs = [ + build-system = [ flit-core ]; - propagatedBuildInputs = [ + dependencies = [ astroid deal-solver pygments @@ -51,15 +51,13 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytestCheckHook - docstring-parser - marshmallow - sphinx hypothesis - vaa + marshmallow + pytestCheckHook + sphinx urllib3 - flake8 + vaa ]; pytestFlagsArray = [ @@ -67,7 +65,7 @@ buildPythonPackage rec { ]; disabledTests = [ - # needs internet access + # Tests need internet access "test_smoke_has" "test_pure_offline" "test_raises_doesnt_override_another_contract" @@ -84,25 +82,30 @@ buildPythonPackage rec { # assert errors "test_doctest" "test_no_violations" + "test_source_get_lambda_multiline_splitted_dec" ]; disabledTestPaths = [ - # needs internet access + # Test needs internet access "tests/test_runtime/test_offline.py" # depends on typeguard <4.0.0 for tests, but >=4.0.0 seems fine for runtime # https://github.com/life4/deal/blob/9be70fa1c5a0635880619b2cea83a9f6631eb236/pyproject.toml#L40 "tests/test_testing.py" ]; - pythonImportsCheck = [ "deal" ]; + pythonImportsCheck = [ + "deal" + ]; meta = with lib; { description = "Library for design by contract (DbC) and checking values, exceptions, and side-effects"; longDescription = '' In a nutshell, deal empowers you to write bug-free code. - By adding a few decorators to your code, you get for free tests, static analysis, formal verification, and much more + By adding a few decorators to your code, you get for free tests, static analysis, formal verification, + and much more. ''; homepage = "https://github.com/life4/deal"; + changelog = "https://github.com/life4/deal/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ gador ]; }; From 94fb0e3542c6e0ca1fcef587d4437757cc0600ed Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Mar 2024 09:08:06 +0100 Subject: [PATCH 4/5] python312Packages.deal: 4.24.3 -> 4.24.4 Diff: https://github.com/life4/deal/compare/refs/tags/4.24.3...4.24.4 Changelog: https://github.com/life4/deal/releases/tag/4.24.4 --- pkgs/development/python-modules/deal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/deal/default.nix b/pkgs/development/python-modules/deal/default.nix index faaeda80bc8b..41d966c8f1e8 100644 --- a/pkgs/development/python-modules/deal/default.nix +++ b/pkgs/development/python-modules/deal/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "deal"; - version = "4.24.3"; + version = "4.24.4"; pyproject = true; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "life4"; repo = "deal"; rev = "refs/tags/${version}"; - hash = "sha256-QlM3d/jmg6v3L3D45+cgcCej71U1dl4uZ6sAYGGm3tU="; + hash = "sha256-4orpoYfPGSvquhg9w63uUe8QbBa2RUpxaEJ9uy28+fU="; }; postPatch = '' From f30569cbcf799b2f1ce3c5bbc1fd71d9eb187b6c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Mar 2024 09:11:35 +0100 Subject: [PATCH 5/5] python312Packages.icontract: refactor --- .../python-modules/icontract/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/icontract/default.nix b/pkgs/development/python-modules/icontract/default.nix index e525cf89cca2..f8b9fd589f18 100644 --- a/pkgs/development/python-modules/icontract/default.nix +++ b/pkgs/development/python-modules/icontract/default.nix @@ -1,26 +1,28 @@ { lib -, buildPythonPackage -, pythonOlder -, fetchFromGitHub , astor , asttokens , asyncstdlib +, buildPythonPackage , deal , dpcontracts +, fetchFromGitHub , numpy , pytestCheckHook +, pythonOlder +, setuptools , typing-extensions }: buildPythonPackage rec { pname = "icontract"; version = "2.6.6"; - format = "setuptools"; + pyproject = true; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "Parquery"; - repo = pname; + repo = "icontract"; rev = "refs/tags/v${version}"; hash = "sha256-R5/FBfuTvXItfTlNZMSnO18Q+etnHbQyXFWpaOpOLes="; }; @@ -32,7 +34,11 @@ buildPythonPackage rec { export ICONTRACT_SLOW=1 ''; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ asttokens typing-extensions ]; @@ -46,11 +52,16 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = [ + # AssertionError + "test_abstract_method_not_implemented" + ]; + disabledTestPaths = [ # mypy decorator checks don't pass. For some reason mypy # doesn't check the python file provided in the test. "tests/test_mypy_decorators.py" - # those tests seems to simply re-run some typeguard tests + # Those tests seems to simply re-run some typeguard tests "tests/test_typeguard.py" ]; @@ -59,7 +70,9 @@ buildPythonPackage rec { "-W" "ignore::RuntimeWarning" ]; - pythonImportsCheck = [ "icontract" ]; + pythonImportsCheck = [ + "icontract" + ]; meta = with lib; { description = "Provide design-by-contract with informative violation messages";