faster-eth-utils 5.3.27__tar.gz → 5.3.28__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. {faster_eth_utils-5.3.27/faster_eth_utils.egg-info → faster_eth_utils-5.3.28}/PKG-INFO +4 -4
  2. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/conversions.py +2 -0
  3. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28/faster_eth_utils.egg-info}/PKG-INFO +4 -4
  4. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/SOURCES.txt +1 -0
  5. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/requires.txt +3 -3
  6. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/pyproject.toml +2 -2
  7. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/requirements-codspeed.txt +1 -1
  8. faster_eth_utils-5.3.28/scripts/benchmark/setup_compiled_benchmark_env.sh +55 -0
  9. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/setup.py +2 -2
  10. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/conversion-utils/test_conversions.py +5 -0
  11. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/LICENSE +0 -0
  12. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/MANIFEST.in +0 -0
  13. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/README.md +0 -0
  14. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/__init__.py +0 -0
  15. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/__json/eth_networks.json +0 -0
  16. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/__main__.py +0 -0
  17. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/abi.py +0 -0
  18. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/address.py +0 -0
  19. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/applicators.py +0 -0
  20. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/crypto.py +0 -0
  21. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/currency.py +0 -0
  22. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/curried/__init__.py +0 -0
  23. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/debug.py +0 -0
  24. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/decorators.py +0 -0
  25. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/encoding.py +0 -0
  26. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/exceptions.py +0 -0
  27. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/functional.py +0 -0
  28. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/hexadecimal.py +0 -0
  29. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/humanize.py +0 -0
  30. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/logging.py +0 -0
  31. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/module_loading.py +0 -0
  32. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/network.py +0 -0
  33. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/numeric.py +0 -0
  34. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/py.typed +0 -0
  35. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/pydantic.py +0 -0
  36. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/toolz.py +0 -0
  37. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/types.py +0 -0
  38. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/typing/__init__.py +0 -0
  39. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/typing/misc.py +0 -0
  40. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils/units.py +0 -0
  41. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/dependency_links.txt +0 -0
  42. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/not-zip-safe +0 -0
  43. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/top_level.txt +0 -0
  44. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/requirements-benchmark.txt +0 -0
  45. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/requirements-dev.txt +0 -0
  46. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/requirements-mypy.txt +0 -0
  47. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/requirements-pytest.txt +0 -0
  48. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/requirements-test.txt +0 -0
  49. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/scripts/benchmark/compare_benchmark_results.py +0 -0
  50. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/scripts/benchmark/generate_benchmark_markdown.py +0 -0
  51. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/scripts/benchmark/parse_benchmark_output.py +0 -0
  52. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/scripts/ci/smoke_test_built_wheel.py +0 -0
  53. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/scripts/release/test_package.py +0 -0
  54. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/setup.cfg +0 -0
  55. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/abi-utils/test_abi_utils.py +0 -0
  56. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/address-utils/test_address_utils.py +0 -0
  57. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/applicator-utils/test_applicators.py +0 -0
  58. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/currency-utils/test_currency_tools.py +0 -0
  59. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/currency-utils/test_denoms_obj.py +0 -0
  60. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/curried-utils/test_curried.py +0 -0
  61. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/decorator-utils/test_combomethod.py +0 -0
  62. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/decorator-utils/test_replace_exceptions.py +0 -0
  63. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/encoding-utils/test_big_endian_integer.py +0 -0
  64. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/functional-utils/test_return_value_decorators.py +0 -0
  65. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/functional-utils/test_type_inference.py +0 -0
  66. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_0x_prefix_addition_and_removal.py +0 -0
  67. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_is_0x_prefixed.py +0 -0
  68. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_is_hex.py +0 -0
  69. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_is_hexstr.py +0 -0
  70. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_bytes.py +0 -0
  71. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_hash.py +0 -0
  72. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_hexstr.py +0 -0
  73. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_integer_sequence.py +0 -0
  74. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_ipfs_uri.py +0 -0
  75. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_seconds.py +0 -0
  76. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_wei.py +0 -0
  77. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_DEBUG2_logging.py +0 -0
  78. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_compat_with_abc_ABC.py +0 -0
  79. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_get_logger.py +0 -0
  80. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_has_logger_metaclass.py +0 -0
  81. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/module-loading-utils/test_import_string.py +0 -0
  82. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/network-utils/test_network_utils.py +0 -0
  83. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/numeric-utils/test_clamp.py +0 -0
  84. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/pydantic-utils/test_camel_model.py +0 -0
  85. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/test_import_and_version.py +0 -0
  86. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/type-checks/mypy_typing_of_curried_utils.py +0 -0
  87. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/type-checks/mypy_typing_of_functional_utils.py +0 -0
  88. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/type-checks/mypy_typing_of_has_logger.py +0 -0
  89. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/core/types-utils/test_types_utils.py +0 -0
  90. {faster_eth_utils-5.3.27 → faster_eth_utils-5.3.28}/tests/mypy/abi_types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster-eth-utils
3
- Version: 5.3.27
3
+ Version: 5.3.28
4
4
  Summary: A faster fork of eth-utils: Common utility functions for python code that interacts with Ethereum. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/faster-eth-utils
6
6
  Author: The Ethereum Foundation
@@ -27,7 +27,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
27
27
  Requires-Python: >=3.10, <4
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
- Requires-Dist: cchecksum==0.4.3
30
+ Requires-Dist: cchecksum==0.4.4
31
31
  Requires-Dist: eth-hash>=0.3.1
32
32
  Requires-Dist: eth-typing==5.2.1
33
33
  Requires-Dist: eth-utils==5.3.1
@@ -64,13 +64,13 @@ Requires-Dist: mypy[mypyc]<2.2,>=2.1; extra == "test"
64
64
  Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
65
65
  Requires-Dist: pytest>=7.0.0; extra == "test"
66
66
  Provides-Extra: codspeed
67
- Requires-Dist: pytest-codspeed<5.1,>=5; extra == "codspeed"
67
+ Requires-Dist: pytest-codspeed<5.1,>=5.0.3; extra == "codspeed"
68
68
  Requires-Dist: pytest-test-groups; extra == "codspeed"
69
69
  Requires-Dist: pytest>=7.0.0; extra == "codspeed"
70
70
  Provides-Extra: benchmark
71
71
  Requires-Dist: eth-utils==5.3.1; extra == "benchmark"
72
72
  Requires-Dist: pytest-benchmark<5.3,>=5.2; extra == "benchmark"
73
- Requires-Dist: pytest-codspeed<5.1,>=5; extra == "benchmark"
73
+ Requires-Dist: pytest-codspeed<5.1,>=5.0.3; extra == "benchmark"
74
74
  Requires-Dist: pytest-test-groups; extra == "benchmark"
75
75
  Requires-Dist: pytest>=7.0.0; extra == "benchmark"
76
76
  Dynamic: author
@@ -117,6 +117,8 @@ def to_bytes(
117
117
  elif isinstance(primitive, bytes):
118
118
  return primitive
119
119
  elif isinstance(primitive, int):
120
+ if primitive < 0:
121
+ raise ValueError("Cannot convert negative integer to bytes")
120
122
  return int_to_big_endian(primitive)
121
123
  elif hexstr is not None:
122
124
  if len(hexstr) % 2:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster-eth-utils
3
- Version: 5.3.27
3
+ Version: 5.3.28
4
4
  Summary: A faster fork of eth-utils: Common utility functions for python code that interacts with Ethereum. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/faster-eth-utils
6
6
  Author: The Ethereum Foundation
@@ -27,7 +27,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
27
27
  Requires-Python: >=3.10, <4
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
- Requires-Dist: cchecksum==0.4.3
30
+ Requires-Dist: cchecksum==0.4.4
31
31
  Requires-Dist: eth-hash>=0.3.1
32
32
  Requires-Dist: eth-typing==5.2.1
33
33
  Requires-Dist: eth-utils==5.3.1
@@ -64,13 +64,13 @@ Requires-Dist: mypy[mypyc]<2.2,>=2.1; extra == "test"
64
64
  Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
65
65
  Requires-Dist: pytest>=7.0.0; extra == "test"
66
66
  Provides-Extra: codspeed
67
- Requires-Dist: pytest-codspeed<5.1,>=5; extra == "codspeed"
67
+ Requires-Dist: pytest-codspeed<5.1,>=5.0.3; extra == "codspeed"
68
68
  Requires-Dist: pytest-test-groups; extra == "codspeed"
69
69
  Requires-Dist: pytest>=7.0.0; extra == "codspeed"
70
70
  Provides-Extra: benchmark
71
71
  Requires-Dist: eth-utils==5.3.1; extra == "benchmark"
72
72
  Requires-Dist: pytest-benchmark<5.3,>=5.2; extra == "benchmark"
73
- Requires-Dist: pytest-codspeed<5.1,>=5; extra == "benchmark"
73
+ Requires-Dist: pytest-codspeed<5.1,>=5.0.3; extra == "benchmark"
74
74
  Requires-Dist: pytest-test-groups; extra == "benchmark"
75
75
  Requires-Dist: pytest>=7.0.0; extra == "benchmark"
76
76
  Dynamic: author
@@ -46,6 +46,7 @@ faster_eth_utils/typing/misc.py
46
46
  scripts/benchmark/compare_benchmark_results.py
47
47
  scripts/benchmark/generate_benchmark_markdown.py
48
48
  scripts/benchmark/parse_benchmark_output.py
49
+ scripts/benchmark/setup_compiled_benchmark_env.sh
49
50
  scripts/ci/smoke_test_built_wheel.py
50
51
  scripts/release/test_package.py
51
52
  tests/core/test_import_and_version.py
@@ -1,4 +1,4 @@
1
- cchecksum==0.4.3
1
+ cchecksum==0.4.4
2
2
  eth-hash>=0.3.1
3
3
  eth-typing==5.2.1
4
4
  eth-utils==5.3.1
@@ -14,12 +14,12 @@ toolz>0.8.2
14
14
  [benchmark]
15
15
  eth-utils==5.3.1
16
16
  pytest-benchmark<5.3,>=5.2
17
- pytest-codspeed<5.1,>=5
17
+ pytest-codspeed<5.1,>=5.0.3
18
18
  pytest-test-groups
19
19
  pytest>=7.0.0
20
20
 
21
21
  [codspeed]
22
- pytest-codspeed<5.1,>=5
22
+ pytest-codspeed<5.1,>=5.0.3
23
23
  pytest-test-groups
24
24
  pytest>=7.0.0
25
25
 
@@ -3,7 +3,7 @@ requires = [
3
3
  "setuptools",
4
4
  "wheel",
5
5
  "mypy[mypyc]==2.1.0",
6
- "cchecksum==0.4.3",
6
+ "cchecksum==0.4.4",
7
7
  "eth-hash==0.7.1",
8
8
  "eth-typing==5.2.1",
9
9
  # puccinialin (installed with eth-utils) is unable to install for
@@ -139,7 +139,7 @@ name = "Removals"
139
139
  showcontent = true
140
140
 
141
141
  [tool.bumpversion]
142
- current_version = "5.3.27"
142
+ current_version = "5.3.28"
143
143
  parse = """
144
144
  (?P<major>\\d+)
145
145
  \\.(?P<minor>\\d+)
@@ -1,4 +1,4 @@
1
1
  -r requirements-pytest.txt
2
2
 
3
- pytest-codspeed>=5,<5.1
3
+ pytest-codspeed>=5.0.3,<5.1
4
4
  pytest-test-groups
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ requirements_file="${1:?usage: setup_compiled_benchmark_env.sh <requirements-file>}"
5
+
6
+ python -m pip install --upgrade pip
7
+
8
+ mapfile -t wheels < <(find wheelhouse -maxdepth 1 -type f -name '*.whl' | sort)
9
+ if [[ "${#wheels[@]}" -ne 1 ]]; then
10
+ echo "Expected exactly 1 wheel in wheelhouse/, found ${#wheels[@]}." >&2
11
+ ls -al wheelhouse ||:
12
+ exit 1
13
+ fi
14
+
15
+ wheel_path="${wheels[0]}"
16
+ echo "Installing compiled wheel: ${wheel_path}"
17
+ python -m pip install "${wheel_path}" -r "${requirements_file}"
18
+
19
+ # Force imports to resolve from the installed package.
20
+ rm -rf faster_eth_utils
21
+
22
+ python - <<'PY'
23
+ import importlib
24
+ import importlib.machinery
25
+
26
+ MODULES_TO_VERIFY = [
27
+ "faster_eth_utils.abi",
28
+ "faster_eth_utils.address",
29
+ "faster_eth_utils.conversions",
30
+ "faster_eth_utils.crypto",
31
+ ]
32
+
33
+ ext_suffixes = tuple(importlib.machinery.EXTENSION_SUFFIXES)
34
+ errors = []
35
+
36
+ for module_name in MODULES_TO_VERIFY:
37
+ module = importlib.import_module(module_name)
38
+ module_file = getattr(module, "__file__", None)
39
+ if not module_file:
40
+ errors.append(f"{module_name}: missing __file__")
41
+ continue
42
+
43
+ normalized = module_file.replace("\\", "/")
44
+ if not normalized.endswith(ext_suffixes):
45
+ errors.append(
46
+ f"{module_name}: expected compiled extension suffix {ext_suffixes}, got {module_file}"
47
+ )
48
+ if "/site-packages/" not in normalized:
49
+ errors.append(f"{module_name}: expected site-packages import path, got {module_file}")
50
+
51
+ if errors:
52
+ raise SystemExit("Compiled environment validation failed:\n- " + "\n- ".join(errors))
53
+
54
+ print("Compiled environment validation passed for:", ", ".join(MODULES_TO_VERIFY))
55
+ PY
@@ -15,7 +15,7 @@ else:
15
15
  for cmd in ("sdist", "egg_info", "--name", "--version", "--help", "--help-commands")
16
16
  )
17
17
 
18
- VERSION: Final = "5.3.27"
18
+ VERSION: Final = "5.3.28"
19
19
  DESCRIPTION: Final = "A faster fork of eth-utils: Common utility functions for python code that interacts with Ethereum. Implemented in C."
20
20
 
21
21
  ext_modules: list[Extension] = []
@@ -118,7 +118,7 @@ setup(
118
118
  },
119
119
  include_package_data=True,
120
120
  install_requires=[
121
- "cchecksum==0.4.3",
121
+ "cchecksum==0.4.4",
122
122
  "eth-hash>=0.3.1",
123
123
  "eth-typing==5.2.1",
124
124
  "eth-utils==5.3.1",
@@ -33,6 +33,11 @@ def test_to_bytes_primitive(val, expected):
33
33
  assert to_bytes(val) == expected
34
34
 
35
35
 
36
+ def test_to_bytes_negative_integer_raises_value_error():
37
+ with pytest.raises(ValueError):
38
+ to_bytes(-1)
39
+
40
+
36
41
  @pytest.mark.parametrize(
37
42
  "val, expected",
38
43
  (