diff --git a/pkgs/development/python-modules/asn1tools/default.nix b/pkgs/development/python-modules/asn1tools/default.nix index 0d1cab6280563..57f797c72614c 100644 --- a/pkgs/development/python-modules/asn1tools/default.nix +++ b/pkgs/development/python-modules/asn1tools/default.nix @@ -1,15 +1,23 @@ { lib, - bitstruct, buildPythonPackage, - diskcache, fetchFromGitHub, - prompt-toolkit, + + # build-system + setuptools, + + # dependencies + bitstruct, pyparsing, + + # optional-dependencies + prompt-toolkit, + diskcache, + + # tests pytest-xdist, pytestCheckHook, - pythonOlder, - setuptools, + versionCheckHook, }: buildPythonPackage rec { @@ -17,8 +25,6 @@ buildPythonPackage rec { version = "0.167.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "eerimoq"; repo = "asn1tools"; @@ -41,7 +47,9 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest-xdist pytestCheckHook + versionCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); + versionCheckProgramArg = [ "--version" ]; pythonImportsCheck = [ "asn1tools" ]; @@ -49,13 +57,23 @@ buildPythonPackage rec { # assert exact error message of pyparsing which changed and no longer matches # https://github.com/eerimoq/asn1tools/issues/167 "test_parse_error" + + # IndexError: string index out of range + # https://github.com/eerimoq/asn1tools/issues/191 + "test_c_source" + "test_command_line_generate_c_source_oer" + "test_missing_parameterized_value" + "test_parse_parameterization" + # SystemExit: error: string index out of range + "test_command_line_generate_c_source_uper" + "test_command_line_generate_rust_source_uper" ]; - meta = with lib; { + meta = { description = "ASN.1 parsing, encoding and decoding"; homepage = "https://github.com/eerimoq/asn1tools"; changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}"; - license = licenses.mit; + license = lib.licenses.mit; maintainers = [ ]; mainProgram = "asn1tools"; }; diff --git a/pkgs/development/python-modules/eth-account/default.nix b/pkgs/development/python-modules/eth-account/default.nix index 918100ec7f571..be26789c06238 100644 --- a/pkgs/development/python-modules/eth-account/default.nix +++ b/pkgs/development/python-modules/eth-account/default.nix @@ -2,7 +2,10 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system setuptools, + # dependencies bitarray, ckzg, @@ -14,7 +17,8 @@ hexbytes, rlp, websockets, - # nativeCheckInputs + + # tests hypothesis, pydantic, pytestCheckHook, @@ -23,14 +27,14 @@ buildPythonPackage rec { pname = "eth-account"; - version = "0.13.4"; + version = "0.13.5"; pyproject = true; src = fetchFromGitHub { owner = "ethereum"; repo = "eth-account"; tag = "v${version}"; - hash = "sha256-Y55WCgWJd2AaDNKbyBe9oi1soT19RdUjQWy5884Pcq8="; + hash = "sha256-CBD0vJLYA+3FreOTsVXJlDJhRvPbDUn4X55o6EF+uBA="; }; build-system = [ setuptools ]; @@ -60,8 +64,12 @@ buildPythonPackage rec { "test_messages_where_all_3_sigs_match" "test_messages_where_eth_account_matches_ethers_but_not_metamask" "test_messages_where_eth_account_matches_metamask_but_not_ethers" + # disable flaky fuzzing test "test_compatibility" + + # Attempts at installing the wheel + "test_install_local_wheel" ]; pythonImportsCheck = [ "eth_account" ]; diff --git a/pkgs/development/python-modules/web3/default.nix b/pkgs/development/python-modules/web3/default.nix index df894986b3ed5..282de6e5824a8 100644 --- a/pkgs/development/python-modules/web3/default.nix +++ b/pkgs/development/python-modules/web3/default.nix @@ -2,7 +2,10 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system setuptools, + # dependencies aiohttp, eth-abi, @@ -11,7 +14,6 @@ eth-typing, eth-utils, hexbytes, - ipfshttpclient, jsonschema, lru-dict, protobuf, @@ -19,37 +21,40 @@ requests, types-requests, websockets, - # nativeCheckInputs + + # optional-dependencies + ipfshttpclient, + + # tests eth-tester, flaky, hypothesis, py-evm, pytest-asyncio_0_21, - pytestCheckHook, pytest-mock, pytest-xdist, + pytestCheckHook, pyunormalize, }: buildPythonPackage rec { pname = "web3"; - version = "7.6.1"; + version = "7.8.0"; pyproject = true; src = fetchFromGitHub { owner = "ethereum"; repo = "web3.py"; tag = "v${version}"; - hash = "sha256-rpXSkQtqUZiCLMF2XlElbsjFjJmX+3j/NdAU2oaPU54="; - }; - - # Note: to reflect the extra_requires in main/setup.py. - optional-dependencies = { - ipfs = [ ipfshttpclient ]; + hash = "sha256-Rk12QZK47oF0ri1+kCquW4vaqPPPO5UPYOhq4StR1+U="; }; build-system = [ setuptools ]; + pythonRelaxDeps = [ + "websockets" + ]; + dependencies = [ aiohttp @@ -71,39 +76,53 @@ buildPythonPackage rec { websockets ]; + # Note: to reflect the extra_requires in main/setup.py. + optional-dependencies = { + ipfs = [ ipfshttpclient ]; + }; + nativeCheckInputs = [ eth-tester flaky hypothesis py-evm pytest-asyncio_0_21 - pytestCheckHook pytest-mock pytest-xdist + pytestCheckHook pyunormalize ]; disabledTests = [ # side-effect: runs pip online check and is blocked by sandbox "test_install_local_wheel" + # not sure why they fail - "test_init_multiple_contracts_performance" "test_async_init_multiple_contracts_performance" + "test_init_multiple_contracts_performance" + + # AssertionError: assert '/build/geth.ipc' == '/tmp/geth.ipc + "test_get_dev_ipc_path" + + # Require network access + "test_websocket_provider_timeout" ]; disabledTestPaths = [ # requires geth library and binaries "tests/integration/go_ethereum" + # requires local running beacon node "tests/beacon" ]; pythonImportsCheck = [ "web3" ]; - meta = with lib; { + meta = { description = "Python interface for interacting with the Ethereum blockchain and ecosystem"; homepage = "https://web3py.readthedocs.io/"; - license = licenses.mit; - maintainers = with maintainers; [ hellwolf ]; + changelog = "https://web3py.readthedocs.io/en/stable/release_notes.html"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hellwolf ]; }; }