faster-hexbytes 1.3.6__tar.gz → 1.3.7__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 (23) hide show
  1. {faster_hexbytes-1.3.6/faster_hexbytes.egg-info → faster_hexbytes-1.3.7}/PKG-INFO +5 -6
  2. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes/_utils.py +1 -1
  3. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes/main.py +6 -0
  4. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7/faster_hexbytes.egg-info}/PKG-INFO +5 -6
  5. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes.egg-info/requires.txt +3 -3
  6. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/pyproject.toml +5 -2
  7. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/setup.py +6 -7
  8. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/LICENSE +0 -0
  9. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/MANIFEST.in +0 -0
  10. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/README.md +0 -0
  11. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes/__init__.py +0 -0
  12. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes/py.typed +0 -0
  13. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes.egg-info/SOURCES.txt +0 -0
  14. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes.egg-info/dependency_links.txt +0 -0
  15. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes.egg-info/not-zip-safe +0 -0
  16. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/faster_hexbytes.egg-info/top_level.txt +0 -0
  17. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/scripts/benchmark/compare_benchmark_results.py +0 -0
  18. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/scripts/benchmark/generate_benchmark_markdown.py +0 -0
  19. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/scripts/benchmark/parse_benchmark_output.py +0 -0
  20. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/scripts/release/test_package.py +0 -0
  21. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/setup.cfg +0 -0
  22. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/tests/core/test_hexbytes.py +0 -0
  23. {faster_hexbytes-1.3.6 → faster_hexbytes-1.3.7}/tests/core/test_import_and_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster_hexbytes
3
- Version: 1.3.6
3
+ Version: 1.3.7
4
4
  Summary: A faster fork of hexbytes: Python `bytes` subclass that decodes hex, with a readable console output. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/faster-hexbytes
6
6
  Author: The Ethereum Foundation
@@ -20,13 +20,12 @@ Classifier: Intended Audience :: Developers
20
20
  Classifier: License :: OSI Approved :: MIT License
21
21
  Classifier: Natural Language :: English
22
22
  Classifier: Programming Language :: Python :: 3
23
- Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
25
24
  Classifier: Programming Language :: Python :: 3.11
26
25
  Classifier: Programming Language :: Python :: 3.12
27
26
  Classifier: Programming Language :: Python :: 3.13
28
27
  Classifier: Programming Language :: Python :: 3.14
29
- Requires-Python: >=3.9, <4
28
+ Requires-Python: >=3.10, <4
30
29
  Description-Content-Type: text/markdown
31
30
  License-File: LICENSE
32
31
  Requires-Dist: hexbytes==1.3.1
@@ -36,7 +35,7 @@ Provides-Extra: dev
36
35
  Requires-Dist: build>=0.9.0; extra == "dev"
37
36
  Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
38
37
  Requires-Dist: ipython; extra == "dev"
39
- Requires-Dist: mypy==1.19.1; extra == "dev"
38
+ Requires-Dist: mypy==1.20.0; extra == "dev"
40
39
  Requires-Dist: pre-commit>=3.4.0; extra == "dev"
41
40
  Requires-Dist: tox>=4.0.0; extra == "dev"
42
41
  Requires-Dist: twine; extra == "dev"
@@ -61,10 +60,10 @@ Requires-Dist: pytest>=7.0.0; extra == "test"
61
60
  Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
62
61
  Provides-Extra: benchmark
63
62
  Requires-Dist: pytest-benchmark; extra == "benchmark"
64
- Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "benchmark"
63
+ Requires-Dist: pytest-codspeed<4.4,>=4.3; extra == "benchmark"
65
64
  Requires-Dist: eth-typing; extra == "benchmark"
66
65
  Provides-Extra: codspeed
67
- Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "codspeed"
66
+ Requires-Dist: pytest-codspeed<4.4,>=4.3; extra == "codspeed"
68
67
  Requires-Dist: eth-typing; extra == "codspeed"
69
68
  Dynamic: author
70
69
  Dynamic: author-email
@@ -46,7 +46,7 @@ def hexstr_to_bytes(hexstr: str) -> bytes:
46
46
  return b""
47
47
 
48
48
  # if the hex string is odd-length, then left-pad it to an even length
49
- if len(hexstr) % 2:
49
+ if len(non_prefixed_hex) & 1:
50
50
  padded_hex = "0" + non_prefixed_hex
51
51
  else:
52
52
  padded_hex = non_prefixed_hex
@@ -46,6 +46,12 @@ class HexBytes(hexbytes.HexBytes):
46
46
  """
47
47
 
48
48
  def __new__(cls, val: BytesLike) -> Self:
49
+ if type(val) is cls:
50
+ # These are immutable, just return it
51
+ return val
52
+ elif isinstance(val, bytes):
53
+ # These don't require `to_bytes`
54
+ return _bytes_new(cls, val)
49
55
  bytesval = to_bytes(val)
50
56
  return _bytes_new(cls, bytesval)
51
57
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster_hexbytes
3
- Version: 1.3.6
3
+ Version: 1.3.7
4
4
  Summary: A faster fork of hexbytes: Python `bytes` subclass that decodes hex, with a readable console output. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/faster-hexbytes
6
6
  Author: The Ethereum Foundation
@@ -20,13 +20,12 @@ Classifier: Intended Audience :: Developers
20
20
  Classifier: License :: OSI Approved :: MIT License
21
21
  Classifier: Natural Language :: English
22
22
  Classifier: Programming Language :: Python :: 3
23
- Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
25
24
  Classifier: Programming Language :: Python :: 3.11
26
25
  Classifier: Programming Language :: Python :: 3.12
27
26
  Classifier: Programming Language :: Python :: 3.13
28
27
  Classifier: Programming Language :: Python :: 3.14
29
- Requires-Python: >=3.9, <4
28
+ Requires-Python: >=3.10, <4
30
29
  Description-Content-Type: text/markdown
31
30
  License-File: LICENSE
32
31
  Requires-Dist: hexbytes==1.3.1
@@ -36,7 +35,7 @@ Provides-Extra: dev
36
35
  Requires-Dist: build>=0.9.0; extra == "dev"
37
36
  Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
38
37
  Requires-Dist: ipython; extra == "dev"
39
- Requires-Dist: mypy==1.19.1; extra == "dev"
38
+ Requires-Dist: mypy==1.20.0; extra == "dev"
40
39
  Requires-Dist: pre-commit>=3.4.0; extra == "dev"
41
40
  Requires-Dist: tox>=4.0.0; extra == "dev"
42
41
  Requires-Dist: twine; extra == "dev"
@@ -61,10 +60,10 @@ Requires-Dist: pytest>=7.0.0; extra == "test"
61
60
  Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
62
61
  Provides-Extra: benchmark
63
62
  Requires-Dist: pytest-benchmark; extra == "benchmark"
64
- Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "benchmark"
63
+ Requires-Dist: pytest-codspeed<4.4,>=4.3; extra == "benchmark"
65
64
  Requires-Dist: eth-typing; extra == "benchmark"
66
65
  Provides-Extra: codspeed
67
- Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "codspeed"
66
+ Requires-Dist: pytest-codspeed<4.4,>=4.3; extra == "codspeed"
68
67
  Requires-Dist: eth-typing; extra == "codspeed"
69
68
  Dynamic: author
70
69
  Dynamic: author-email
@@ -4,18 +4,18 @@ typing-extensions<5,>=4.0.0
4
4
 
5
5
  [benchmark]
6
6
  pytest-benchmark
7
- pytest-codspeed<4.3,>=4.2
7
+ pytest-codspeed<4.4,>=4.3
8
8
  eth-typing
9
9
 
10
10
  [codspeed]
11
- pytest-codspeed<4.3,>=4.2
11
+ pytest-codspeed<4.4,>=4.3
12
12
  eth-typing
13
13
 
14
14
  [dev]
15
15
  build>=0.9.0
16
16
  bump_my_version>=0.19.0
17
17
  ipython
18
- mypy==1.19.1
18
+ mypy==1.20.0
19
19
  pre-commit>=3.4.0
20
20
  tox>=4.0.0
21
21
  twine
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools", "wheel", "mypy[mypyc]==1.19.1", "hexbytes==1.3.1"]
2
+ requires = ["setuptools", "wheel", "mypy[mypyc]==1.20.0", "hexbytes==1.3.1"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.autoflake]
@@ -20,6 +20,9 @@ profile = "black"
20
20
  use_parentheses = true
21
21
 
22
22
  [tool.mypy]
23
+ packages = ["faster_hexbytes"]
24
+ pretty = true
25
+ no_implicit_reexport = true
23
26
  check_untyped_defs = true
24
27
  disallow_any_generics = true
25
28
  disallow_incomplete_defs = true
@@ -129,7 +132,7 @@ name = "Removals"
129
132
  showcontent = true
130
133
 
131
134
  [tool.bumpversion]
132
- current_version = "1.3.6"
135
+ current_version = "1.3.7"
133
136
  parse = """
134
137
  (?P<major>\\d+)
135
138
  \\.(?P<minor>\\d+)
@@ -7,7 +7,7 @@ from setuptools import (
7
7
  from mypyc.build import mypycify
8
8
 
9
9
 
10
- version = "1.3.6"
10
+ version = "1.3.7"
11
11
  hexbytes_version = "1.3.1"
12
12
 
13
13
  extras_require = {
@@ -15,7 +15,7 @@ extras_require = {
15
15
  "build>=0.9.0",
16
16
  "bump_my_version>=0.19.0",
17
17
  "ipython",
18
- "mypy==1.19.1",
18
+ "mypy==1.20.0",
19
19
  "pre-commit>=3.4.0",
20
20
  "tox>=4.0.0",
21
21
  "twine",
@@ -35,11 +35,11 @@ extras_require = {
35
35
  ],
36
36
  "benchmark": [
37
37
  "pytest-benchmark",
38
- "pytest-codspeed>=4.2,<4.3",
38
+ "pytest-codspeed>=4.3,<4.4",
39
39
  "eth-typing",
40
40
  ],
41
41
  "codspeed": [
42
- "pytest-codspeed>=4.2,<4.3",
42
+ "pytest-codspeed>=4.3,<4.4",
43
43
  "eth-typing",
44
44
  ],
45
45
  }
@@ -63,7 +63,7 @@ if skip_mypyc:
63
63
  ext_modules = []
64
64
  else:
65
65
  ext_modules = mypycify(
66
- ["faster_hexbytes/", "--strict", "--pretty"],
66
+ ["faster_hexbytes/"],
67
67
  group_name="faster_hexbytes",
68
68
  strict_dunder_typing=True,
69
69
  )
@@ -95,7 +95,7 @@ setup(
95
95
  "mypy_extensions>=0.4.2,<2",
96
96
  "typing-extensions>=4.0.0,<5",
97
97
  ],
98
- python_requires=">=3.9, <4",
98
+ python_requires=">=3.10, <4",
99
99
  extras_require=extras_require,
100
100
  py_modules=["faster_hexbytes"],
101
101
  license="MIT",
@@ -119,7 +119,6 @@ setup(
119
119
  "License :: OSI Approved :: MIT License",
120
120
  "Natural Language :: English",
121
121
  "Programming Language :: Python :: 3",
122
- "Programming Language :: Python :: 3.9",
123
122
  "Programming Language :: Python :: 3.10",
124
123
  "Programming Language :: Python :: 3.11",
125
124
  "Programming Language :: Python :: 3.12",
File without changes