faster-eth-utils 5.3.26__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 (91) hide show
  1. {faster_eth_utils-5.3.26/faster_eth_utils.egg-info → faster_eth_utils-5.3.28}/PKG-INFO +9 -9
  2. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/conversions.py +2 -0
  3. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28/faster_eth_utils.egg-info}/PKG-INFO +9 -9
  4. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/SOURCES.txt +2 -0
  5. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/requires.txt +7 -7
  6. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/pyproject.toml +3 -3
  7. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/requirements-codspeed.txt +1 -1
  8. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/requirements-dev.txt +2 -2
  9. faster_eth_utils-5.3.28/requirements-mypy.txt +1 -0
  10. faster_eth_utils-5.3.28/scripts/benchmark/setup_compiled_benchmark_env.sh +55 -0
  11. faster_eth_utils-5.3.28/scripts/ci/smoke_test_built_wheel.py +59 -0
  12. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/setup.py +3 -3
  13. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/conversion-utils/test_conversions.py +5 -0
  14. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/functional-utils/test_type_inference.py +6 -6
  15. faster_eth_utils-5.3.26/requirements-mypy.txt +0 -1
  16. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/LICENSE +0 -0
  17. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/MANIFEST.in +0 -0
  18. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/README.md +0 -0
  19. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/__init__.py +0 -0
  20. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/__json/eth_networks.json +0 -0
  21. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/__main__.py +0 -0
  22. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/abi.py +0 -0
  23. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/address.py +0 -0
  24. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/applicators.py +0 -0
  25. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/crypto.py +0 -0
  26. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/currency.py +0 -0
  27. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/curried/__init__.py +0 -0
  28. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/debug.py +0 -0
  29. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/decorators.py +0 -0
  30. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/encoding.py +0 -0
  31. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/exceptions.py +0 -0
  32. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/functional.py +0 -0
  33. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/hexadecimal.py +0 -0
  34. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/humanize.py +0 -0
  35. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/logging.py +0 -0
  36. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/module_loading.py +0 -0
  37. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/network.py +0 -0
  38. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/numeric.py +0 -0
  39. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/py.typed +0 -0
  40. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/pydantic.py +0 -0
  41. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/toolz.py +0 -0
  42. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/types.py +0 -0
  43. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/typing/__init__.py +0 -0
  44. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/typing/misc.py +0 -0
  45. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils/units.py +0 -0
  46. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/dependency_links.txt +0 -0
  47. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/not-zip-safe +0 -0
  48. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/faster_eth_utils.egg-info/top_level.txt +0 -0
  49. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/requirements-benchmark.txt +0 -0
  50. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/requirements-pytest.txt +0 -0
  51. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/requirements-test.txt +0 -0
  52. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/scripts/benchmark/compare_benchmark_results.py +0 -0
  53. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/scripts/benchmark/generate_benchmark_markdown.py +0 -0
  54. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/scripts/benchmark/parse_benchmark_output.py +0 -0
  55. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/scripts/release/test_package.py +0 -0
  56. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/setup.cfg +0 -0
  57. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/abi-utils/test_abi_utils.py +0 -0
  58. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/address-utils/test_address_utils.py +0 -0
  59. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/applicator-utils/test_applicators.py +0 -0
  60. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/currency-utils/test_currency_tools.py +0 -0
  61. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/currency-utils/test_denoms_obj.py +0 -0
  62. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/curried-utils/test_curried.py +0 -0
  63. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/decorator-utils/test_combomethod.py +0 -0
  64. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/decorator-utils/test_replace_exceptions.py +0 -0
  65. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/encoding-utils/test_big_endian_integer.py +0 -0
  66. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/functional-utils/test_return_value_decorators.py +0 -0
  67. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_0x_prefix_addition_and_removal.py +0 -0
  68. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_is_0x_prefixed.py +0 -0
  69. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_is_hex.py +0 -0
  70. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/hexadecimal-utils/test_is_hexstr.py +0 -0
  71. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_bytes.py +0 -0
  72. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_hash.py +0 -0
  73. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_hexstr.py +0 -0
  74. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_integer_sequence.py +0 -0
  75. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_ipfs_uri.py +0 -0
  76. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_seconds.py +0 -0
  77. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/humanize-utils/test_humanize_wei.py +0 -0
  78. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_DEBUG2_logging.py +0 -0
  79. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_compat_with_abc_ABC.py +0 -0
  80. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_get_logger.py +0 -0
  81. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/logging-utils/test_has_logger_metaclass.py +0 -0
  82. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/module-loading-utils/test_import_string.py +0 -0
  83. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/network-utils/test_network_utils.py +0 -0
  84. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/numeric-utils/test_clamp.py +0 -0
  85. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/pydantic-utils/test_camel_model.py +0 -0
  86. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/test_import_and_version.py +0 -0
  87. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/type-checks/mypy_typing_of_curried_utils.py +0 -0
  88. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/type-checks/mypy_typing_of_functional_utils.py +0 -0
  89. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/type-checks/mypy_typing_of_has_logger.py +0 -0
  90. {faster_eth_utils-5.3.26 → faster_eth_utils-5.3.28}/tests/core/types-utils/test_types_utils.py +0 -0
  91. {faster_eth_utils-5.3.26 → 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.26
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
@@ -36,13 +36,13 @@ Requires-Dist: toolz>0.8.2; implementation_name == "pypy"
36
36
  Requires-Dist: cytoolz>=0.10.1; implementation_name == "cpython"
37
37
  Requires-Dist: pydantic<3,>=2.0.0
38
38
  Provides-Extra: dev
39
- Requires-Dist: build>=0.9.0; extra == "dev"
39
+ Requires-Dist: build>=1.5.0; extra == "dev"
40
40
  Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
41
41
  Requires-Dist: eth-hash[pycryptodome]; extra == "dev"
42
42
  Requires-Dist: ipython; extra == "dev"
43
- Requires-Dist: mypy[mypyc]<1.21,>=1.20; extra == "dev"
43
+ Requires-Dist: mypy[mypyc]<2.2,>=2.1; extra == "dev"
44
44
  Requires-Dist: pre-commit>=3.4.0; extra == "dev"
45
- Requires-Dist: tox>=4.0.0; extra == "dev"
45
+ Requires-Dist: tox>=4.54.0; extra == "dev"
46
46
  Requires-Dist: twine; extra == "dev"
47
47
  Requires-Dist: wheel; extra == "dev"
48
48
  Requires-Dist: sphinx>=6.0.0; extra == "dev"
@@ -50,7 +50,7 @@ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
50
50
  Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
51
51
  Requires-Dist: towncrier<26,>=24; extra == "dev"
52
52
  Requires-Dist: hypothesis>=4.43.0; extra == "dev"
53
- Requires-Dist: mypy[mypyc]<1.21,>=1.20; extra == "dev"
53
+ Requires-Dist: mypy[mypyc]<2.2,>=2.1; extra == "dev"
54
54
  Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
55
55
  Requires-Dist: pytest>=7.0.0; extra == "dev"
56
56
  Provides-Extra: docs
@@ -60,17 +60,17 @@ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
60
60
  Requires-Dist: towncrier<26,>=24; extra == "docs"
61
61
  Provides-Extra: test
62
62
  Requires-Dist: hypothesis>=4.43.0; extra == "test"
63
- Requires-Dist: mypy[mypyc]<1.21,>=1.20; extra == "test"
63
+ 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<4.4,>=4.3; 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<4.4,>=4.3; 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.26
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
@@ -36,13 +36,13 @@ Requires-Dist: toolz>0.8.2; implementation_name == "pypy"
36
36
  Requires-Dist: cytoolz>=0.10.1; implementation_name == "cpython"
37
37
  Requires-Dist: pydantic<3,>=2.0.0
38
38
  Provides-Extra: dev
39
- Requires-Dist: build>=0.9.0; extra == "dev"
39
+ Requires-Dist: build>=1.5.0; extra == "dev"
40
40
  Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
41
41
  Requires-Dist: eth-hash[pycryptodome]; extra == "dev"
42
42
  Requires-Dist: ipython; extra == "dev"
43
- Requires-Dist: mypy[mypyc]<1.21,>=1.20; extra == "dev"
43
+ Requires-Dist: mypy[mypyc]<2.2,>=2.1; extra == "dev"
44
44
  Requires-Dist: pre-commit>=3.4.0; extra == "dev"
45
- Requires-Dist: tox>=4.0.0; extra == "dev"
45
+ Requires-Dist: tox>=4.54.0; extra == "dev"
46
46
  Requires-Dist: twine; extra == "dev"
47
47
  Requires-Dist: wheel; extra == "dev"
48
48
  Requires-Dist: sphinx>=6.0.0; extra == "dev"
@@ -50,7 +50,7 @@ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
50
50
  Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
51
51
  Requires-Dist: towncrier<26,>=24; extra == "dev"
52
52
  Requires-Dist: hypothesis>=4.43.0; extra == "dev"
53
- Requires-Dist: mypy[mypyc]<1.21,>=1.20; extra == "dev"
53
+ Requires-Dist: mypy[mypyc]<2.2,>=2.1; extra == "dev"
54
54
  Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
55
55
  Requires-Dist: pytest>=7.0.0; extra == "dev"
56
56
  Provides-Extra: docs
@@ -60,17 +60,17 @@ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
60
60
  Requires-Dist: towncrier<26,>=24; extra == "docs"
61
61
  Provides-Extra: test
62
62
  Requires-Dist: hypothesis>=4.43.0; extra == "test"
63
- Requires-Dist: mypy[mypyc]<1.21,>=1.20; extra == "test"
63
+ 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<4.4,>=4.3; 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<4.4,>=4.3; 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,8 @@ 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
50
+ scripts/ci/smoke_test_built_wheel.py
49
51
  scripts/release/test_package.py
50
52
  tests/core/test_import_and_version.py
51
53
  tests/core/abi-utils/test_abi_utils.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,23 +14,23 @@ 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<4.4,>=4.3
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<4.4,>=4.3
22
+ pytest-codspeed<5.1,>=5.0.3
23
23
  pytest-test-groups
24
24
  pytest>=7.0.0
25
25
 
26
26
  [dev]
27
- build>=0.9.0
27
+ build>=1.5.0
28
28
  bump_my_version>=0.19.0
29
29
  eth-hash[pycryptodome]
30
30
  ipython
31
- mypy[mypyc]<1.21,>=1.20
31
+ mypy[mypyc]<2.2,>=2.1
32
32
  pre-commit>=3.4.0
33
- tox>=4.0.0
33
+ tox>=4.54.0
34
34
  twine
35
35
  wheel
36
36
  sphinx>=6.0.0
@@ -49,6 +49,6 @@ towncrier<26,>=24
49
49
 
50
50
  [test]
51
51
  hypothesis>=4.43.0
52
- mypy[mypyc]<1.21,>=1.20
52
+ mypy[mypyc]<2.2,>=2.1
53
53
  pytest-xdist>=2.4.0
54
54
  pytest>=7.0.0
@@ -2,8 +2,8 @@
2
2
  requires = [
3
3
  "setuptools",
4
4
  "wheel",
5
- "mypy[mypyc]==1.20.0",
6
- "cchecksum==0.4.3",
5
+ "mypy[mypyc]==2.1.0",
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.26"
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>=4.3,<4.4
3
+ pytest-codspeed>=5.0.3,<5.1
4
4
  pytest-test-groups
@@ -1,10 +1,10 @@
1
1
  -r requirements-mypy.txt
2
2
 
3
- build>=0.9.0
3
+ build>=1.5.0
4
4
  bump_my_version>=0.19.0
5
5
  eth-hash[pycryptodome]
6
6
  ipython
7
7
  pre-commit>=3.4.0
8
- tox>=4.0.0
8
+ tox>=4.54.0
9
9
  twine
10
10
  wheel
@@ -0,0 +1 @@
1
+ mypy[mypyc]>=2.1,<2.2
@@ -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
@@ -0,0 +1,59 @@
1
+ from __future__ import annotations
2
+
3
+ import shutil
4
+ import subprocess
5
+ import sys
6
+ import tempfile
7
+ from pathlib import Path
8
+
9
+
10
+ PROJECT_ROOT = Path(__file__).resolve().parents[2]
11
+ BUILD_DIR = PROJECT_ROOT / "build"
12
+ DIST_DIR = PROJECT_ROOT / "dist"
13
+ WHEEL_PATTERN = "faster_eth_utils-*.whl"
14
+ PACKAGE_IMPORT = "faster_eth_utils"
15
+
16
+
17
+ def run_python(*args: str, cwd: Path = PROJECT_ROOT) -> None:
18
+ subprocess.run((sys.executable, *args), cwd=cwd, check=True)
19
+
20
+
21
+ def clean_build_artifacts() -> None:
22
+ for path in (BUILD_DIR, DIST_DIR):
23
+ if path.exists():
24
+ shutil.rmtree(path)
25
+
26
+
27
+ def find_built_wheel() -> Path:
28
+ wheels = sorted(DIST_DIR.glob(WHEEL_PATTERN))
29
+ if len(wheels) == 1:
30
+ return wheels[0]
31
+
32
+ found = ", ".join(wheel.name for wheel in wheels) or "none"
33
+ raise SystemExit(
34
+ f"Expected exactly one {WHEEL_PATTERN} in {DIST_DIR}, found {found}."
35
+ )
36
+
37
+
38
+ def main() -> None:
39
+ clean_build_artifacts()
40
+ run_python("-m", "build")
41
+
42
+ wheel = find_built_wheel()
43
+ print(f"Installing wheel: {wheel.name}")
44
+ run_python(
45
+ "-m",
46
+ "pip",
47
+ "install",
48
+ "--upgrade",
49
+ str(wheel),
50
+ "--progress-bar",
51
+ "off",
52
+ )
53
+
54
+ with tempfile.TemporaryDirectory() as tmpdir:
55
+ run_python("-c", f"import {PACKAGE_IMPORT}", cwd=Path(tmpdir))
56
+
57
+
58
+ if __name__ == "__main__":
59
+ main()
@@ -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.26"
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] = []
@@ -57,7 +57,7 @@ if not skip_mypyc:
57
57
  strict_dunder_typing=True,
58
58
  )
59
59
 
60
- MYPY_REQUIREMENT = "mypy==1.20.0"
60
+ MYPY_REQUIREMENT = "mypy==2.1.0"
61
61
  PYTEST_REQUIREMENT = "pytest>=7.0.0"
62
62
 
63
63
 
@@ -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
  (
@@ -38,37 +38,37 @@ def check_mypy_run(
38
38
  (
39
39
  fixture_dir("to_tuple_decorator.py"),
40
40
  fixture_dir(
41
- 'to_tuple_decorator.py:12: note: Revealed type is "builtins.tuple[builtins.int, ...]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
41
+ 'to_tuple_decorator.py:12: note: Revealed type is "tuple[int, ...]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
42
42
  ),
43
43
  ),
44
44
  (
45
45
  fixture_dir("to_list_decorator.py"),
46
46
  fixture_dir(
47
- 'to_list_decorator.py:12: note: Revealed type is "builtins.list[builtins.int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
47
+ 'to_list_decorator.py:12: note: Revealed type is "list[int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
48
48
  ),
49
49
  ),
50
50
  (
51
51
  fixture_dir("to_set_decorator.py"),
52
52
  fixture_dir(
53
- 'to_set_decorator.py:12: note: Revealed type is "builtins.set[builtins.int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
53
+ 'to_set_decorator.py:12: note: Revealed type is "set[int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
54
54
  ),
55
55
  ),
56
56
  (
57
57
  fixture_dir("to_dict_decorator.py"),
58
58
  fixture_dir(
59
- 'to_dict_decorator.py:12: note: Revealed type is "builtins.dict[builtins.int, builtins.int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
59
+ 'to_dict_decorator.py:12: note: Revealed type is "dict[int, int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
60
60
  ),
61
61
  ),
62
62
  (
63
63
  fixture_dir("to_ordered_dict_decorator.py"),
64
64
  fixture_dir(
65
- 'to_ordered_dict_decorator.py:12: note: Revealed type is "collections.OrderedDict[builtins.int, builtins.int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
65
+ 'to_ordered_dict_decorator.py:12: note: Revealed type is "collections.OrderedDict[int, int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
66
66
  ),
67
67
  ),
68
68
  (
69
69
  fixture_dir("apply_to_return_value_decorator.py"),
70
70
  fixture_dir(
71
- 'apply_to_return_value_decorator.py:16: note: Revealed type is "builtins.list[builtins.int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
71
+ 'apply_to_return_value_decorator.py:16: note: Revealed type is "list[int]"\nSuccess: no issues found in 1 source file\n' # noqa: E501
72
72
  ),
73
73
  ),
74
74
  ),
@@ -1 +0,0 @@
1
- mypy[mypyc]>=1.20,<1.21