py-geth 5.0.0b3__py3-none-any.whl → 5.1.0__py3-none-any.whl
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.
- geth/__init__.py +11 -0
- geth/install.py +39 -15
- geth/process.py +6 -10
- {py_geth-5.0.0b3.dist-info → py_geth-5.1.0.dist-info}/METADATA +27 -26
- {py_geth-5.0.0b3.dist-info → py_geth-5.1.0.dist-info}/RECORD +8 -8
- {py_geth-5.0.0b3.dist-info → py_geth-5.1.0.dist-info}/WHEEL +1 -1
- {py_geth-5.0.0b3.dist-info → py_geth-5.1.0.dist-info}/LICENSE +0 -0
- {py_geth-5.0.0b3.dist-info → py_geth-5.1.0.dist-info}/top_level.txt +0 -0
geth/__init__.py
CHANGED
@@ -20,3 +20,14 @@ from .process import (
|
|
20
20
|
)
|
21
21
|
|
22
22
|
__version__ = __version("py-geth")
|
23
|
+
|
24
|
+
__all__ = (
|
25
|
+
"install_geth",
|
26
|
+
"get_geth_version",
|
27
|
+
"InterceptedStreamsMixin",
|
28
|
+
"LoggingMixin",
|
29
|
+
"MainnetGethProcess",
|
30
|
+
"SepoliaGethProcess",
|
31
|
+
"TestnetGethProcess",
|
32
|
+
"DevGethProcess",
|
33
|
+
)
|
geth/install.py
CHANGED
@@ -17,6 +17,13 @@ from typing import (
|
|
17
17
|
Generator,
|
18
18
|
)
|
19
19
|
|
20
|
+
import requests
|
21
|
+
from requests.exceptions import (
|
22
|
+
ConnectionError,
|
23
|
+
HTTPError,
|
24
|
+
Timeout,
|
25
|
+
)
|
26
|
+
|
20
27
|
from geth.exceptions import (
|
21
28
|
PyGethException,
|
22
29
|
PyGethKeyError,
|
@@ -34,6 +41,11 @@ V1_14_4 = "v1.14.4"
|
|
34
41
|
V1_14_5 = "v1.14.5"
|
35
42
|
V1_14_6 = "v1.14.6"
|
36
43
|
V1_14_7 = "v1.14.7"
|
44
|
+
V1_14_8 = "v1.14.8"
|
45
|
+
V1_14_9 = "v1.14.9"
|
46
|
+
V1_14_10 = "v1.14.10"
|
47
|
+
V1_14_11 = "v1.14.11"
|
48
|
+
V1_14_12 = "v1.14.12"
|
37
49
|
|
38
50
|
|
39
51
|
LINUX = "linux"
|
@@ -211,29 +223,27 @@ DOWNLOAD_SOURCE_CODE_URI_TEMPLATE = (
|
|
211
223
|
)
|
212
224
|
|
213
225
|
|
214
|
-
def download_source_code_release(identifier: str) ->
|
226
|
+
def download_source_code_release(identifier: str) -> None:
|
215
227
|
download_uri = DOWNLOAD_SOURCE_CODE_URI_TEMPLATE.format(identifier)
|
216
228
|
source_code_archive_path = get_source_code_archive_path(identifier)
|
217
229
|
|
218
230
|
ensure_parent_dir_exists(source_code_archive_path)
|
231
|
+
try:
|
232
|
+
response = requests.get(download_uri)
|
233
|
+
response.raise_for_status()
|
234
|
+
with open(source_code_archive_path, "wb") as f:
|
235
|
+
f.write(response.content)
|
219
236
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
]
|
227
|
-
|
228
|
-
return check_subprocess_call(
|
229
|
-
command,
|
230
|
-
message=f"Downloading source code release from {download_uri}",
|
231
|
-
)
|
237
|
+
print(f"Downloading source code release from {download_uri}")
|
238
|
+
|
239
|
+
except (HTTPError, Timeout, ConnectionError) as e:
|
240
|
+
raise PyGethException(
|
241
|
+
f"An error occurred while downloading from {download_uri}: {e}"
|
242
|
+
)
|
232
243
|
|
233
244
|
|
234
245
|
def extract_source_code_release(identifier: str) -> None:
|
235
246
|
source_code_archive_path = get_source_code_archive_path(identifier)
|
236
|
-
|
237
247
|
source_code_extract_path = get_source_code_extract_path(identifier)
|
238
248
|
ensure_path_exists(source_code_extract_path)
|
239
249
|
|
@@ -326,7 +336,11 @@ install_v1_14_4 = functools.partial(install_from_source_code_release, V1_14_4)
|
|
326
336
|
install_v1_14_5 = functools.partial(install_from_source_code_release, V1_14_5)
|
327
337
|
install_v1_14_6 = functools.partial(install_from_source_code_release, V1_14_6)
|
328
338
|
install_v1_14_7 = functools.partial(install_from_source_code_release, V1_14_7)
|
329
|
-
|
339
|
+
install_v1_14_8 = functools.partial(install_from_source_code_release, V1_14_8)
|
340
|
+
install_v1_14_9 = functools.partial(install_from_source_code_release, V1_14_9)
|
341
|
+
install_v1_14_10 = functools.partial(install_from_source_code_release, V1_14_10)
|
342
|
+
install_v1_14_11 = functools.partial(install_from_source_code_release, V1_14_11)
|
343
|
+
install_v1_14_12 = functools.partial(install_from_source_code_release, V1_14_12)
|
330
344
|
|
331
345
|
INSTALL_FUNCTIONS = {
|
332
346
|
LINUX: {
|
@@ -337,6 +351,11 @@ INSTALL_FUNCTIONS = {
|
|
337
351
|
V1_14_5: install_v1_14_5,
|
338
352
|
V1_14_6: install_v1_14_6,
|
339
353
|
V1_14_7: install_v1_14_7,
|
354
|
+
V1_14_8: install_v1_14_8,
|
355
|
+
V1_14_9: install_v1_14_9,
|
356
|
+
V1_14_10: install_v1_14_10,
|
357
|
+
V1_14_11: install_v1_14_11,
|
358
|
+
V1_14_12: install_v1_14_12,
|
340
359
|
},
|
341
360
|
OSX: {
|
342
361
|
V1_14_0: install_v1_14_0,
|
@@ -346,6 +365,11 @@ INSTALL_FUNCTIONS = {
|
|
346
365
|
V1_14_5: install_v1_14_5,
|
347
366
|
V1_14_6: install_v1_14_6,
|
348
367
|
V1_14_7: install_v1_14_7,
|
368
|
+
V1_14_8: install_v1_14_8,
|
369
|
+
V1_14_9: install_v1_14_9,
|
370
|
+
V1_14_10: install_v1_14_10,
|
371
|
+
V1_14_11: install_v1_14_11,
|
372
|
+
V1_14_12: install_v1_14_12,
|
349
373
|
},
|
350
374
|
}
|
351
375
|
|
geth/process.py
CHANGED
@@ -186,18 +186,14 @@ class BaseGethProcess(ABC):
|
|
186
186
|
|
187
187
|
@property
|
188
188
|
def ipc_path(self) -> str:
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
self.data_dir,
|
195
|
-
"geth.ipc",
|
196
|
-
)
|
189
|
+
return self.geth_kwargs.get("ipc_path") or os.path.abspath(
|
190
|
+
os.path.expanduser(
|
191
|
+
os.path.join(
|
192
|
+
self.data_dir,
|
193
|
+
"geth.ipc",
|
197
194
|
)
|
198
|
-
)
|
195
|
+
)
|
199
196
|
)
|
200
|
-
return cast(str, _ipc_path)
|
201
197
|
|
202
198
|
@property
|
203
199
|
def is_ipc_ready(self) -> bool:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py-geth
|
3
|
-
Version: 5.0
|
3
|
+
Version: 5.1.0
|
4
4
|
Summary: py-geth: Run Go-Ethereum as a subprocess
|
5
5
|
Home-page: https://github.com/ethereum/py-geth
|
6
6
|
Author: The Ethereum Foundation
|
@@ -20,30 +20,31 @@ Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Requires-Python: >=3.8, <4
|
21
21
|
Description-Content-Type: text/markdown
|
22
22
|
License-File: LICENSE
|
23
|
-
Requires-Dist:
|
24
|
-
Requires-Dist: pydantic
|
25
|
-
Requires-Dist:
|
26
|
-
Requires-Dist:
|
23
|
+
Requires-Dist: eval_type_backport>=0.1.0; python_version < "3.10"
|
24
|
+
Requires-Dist: pydantic>=2.6.0
|
25
|
+
Requires-Dist: requests>=2.23
|
26
|
+
Requires-Dist: semantic-version>=2.6.0
|
27
|
+
Requires-Dist: types-requests>=2.0.0
|
28
|
+
Requires-Dist: typing-extensions>=4.0.1
|
27
29
|
Provides-Extra: dev
|
28
|
-
Requires-Dist: build
|
29
|
-
Requires-Dist: bumpversion
|
30
|
-
Requires-Dist: ipython
|
31
|
-
Requires-Dist: mypy
|
32
|
-
Requires-Dist: pre-commit
|
33
|
-
Requires-Dist:
|
34
|
-
Requires-Dist:
|
35
|
-
Requires-Dist:
|
36
|
-
Requires-Dist:
|
37
|
-
Requires-Dist:
|
38
|
-
Requires-Dist:
|
39
|
-
Requires-Dist: pytest
|
40
|
-
Requires-Dist: pytest-xdist >=2.4.0 ; extra == 'dev'
|
30
|
+
Requires-Dist: build>=0.9.0; extra == "dev"
|
31
|
+
Requires-Dist: bumpversion>=0.5.3; extra == "dev"
|
32
|
+
Requires-Dist: ipython; extra == "dev"
|
33
|
+
Requires-Dist: mypy==1.10.0; extra == "dev"
|
34
|
+
Requires-Dist: pre-commit>=3.4.0; extra == "dev"
|
35
|
+
Requires-Dist: tox>=4.0.0; extra == "dev"
|
36
|
+
Requires-Dist: twine; extra == "dev"
|
37
|
+
Requires-Dist: wheel; extra == "dev"
|
38
|
+
Requires-Dist: towncrier<22,>=21; extra == "dev"
|
39
|
+
Requires-Dist: flaky>=3.2.0; extra == "dev"
|
40
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
41
|
+
Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
|
41
42
|
Provides-Extra: docs
|
42
|
-
Requires-Dist: towncrier
|
43
|
+
Requires-Dist: towncrier<22,>=21; extra == "docs"
|
43
44
|
Provides-Extra: test
|
44
|
-
Requires-Dist: flaky
|
45
|
-
Requires-Dist: pytest
|
46
|
-
Requires-Dist: pytest-xdist
|
45
|
+
Requires-Dist: flaky>=3.2.0; extra == "test"
|
46
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
47
|
+
Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
|
47
48
|
|
48
49
|
# py-geth
|
49
50
|
|
@@ -165,19 +166,19 @@ the current list of supported versions.
|
|
165
166
|
Installation can be done via the command line:
|
166
167
|
|
167
168
|
```bash
|
168
|
-
$ python -m geth.install v1.14.
|
169
|
+
$ python -m geth.install v1.14.12
|
169
170
|
```
|
170
171
|
|
171
172
|
Or from python using the `install_geth` function.
|
172
173
|
|
173
174
|
```python
|
174
175
|
>>> from geth import install_geth
|
175
|
-
>>> install_geth('v1.14.
|
176
|
+
>>> install_geth('v1.14.12')
|
176
177
|
```
|
177
178
|
|
178
179
|
The installed binary can be found in the `$HOME/.py-geth` directory, under your
|
179
|
-
home directory. The `v1.14.
|
180
|
-
`$HOME/.py-geth/geth-v1.14.
|
180
|
+
home directory. The `v1.14.12` binary would be located at
|
181
|
+
`$HOME/.py-geth/geth-v1.14.12/bin/geth`.
|
181
182
|
|
182
183
|
## About `DevGethProcess`
|
183
184
|
|
@@ -1,13 +1,13 @@
|
|
1
|
-
geth/__init__.py,sha256=
|
1
|
+
geth/__init__.py,sha256=vPIxujjhq68syWZuHJQy6vNxW6yqbi7M8hmEtYVoKWs,583
|
2
2
|
geth/accounts.py,sha256=QxhjdyFT5JSgTswQiPsMMgCpTcV9-vaZiksDoWfePTI,5943
|
3
3
|
geth/chain.py,sha256=VMbb1OMI8z-HRteYg7bDgDpf9-SyLYioy2OIYO7oW5s,3879
|
4
4
|
geth/default_blockchain_password,sha256=7ZYUjo1py5Wh_uA_WvoXQG8mPv2CiJ07tI2tOodTLi8,30
|
5
5
|
geth/exceptions.py,sha256=yLGBkLabY_W-43kW9iYPM3FaoR08JWgTWYW1RHukaeU,2643
|
6
6
|
geth/genesis.json,sha256=E6pcGhk0pz1ByhRvyqeVbNAteOB4U1jOj4KiHtR2tAM,901
|
7
|
-
geth/install.py,sha256=
|
7
|
+
geth/install.py,sha256=slY0AvnYCXvxznUdvkCJ_pPAhmePgux8WlZ7QMQaoKk,11459
|
8
8
|
geth/main.py,sha256=jgWIs3o9BfHcqWfuq6l4JBjcdQzDy13-EJDP1c2ouhQ,1463
|
9
9
|
geth/mixins.py,sha256=cpls-_Z9WZdmYbjhOZL-y6F1xRYAvmfWRed2DODe6D8,5639
|
10
|
-
geth/process.py,sha256=
|
10
|
+
geth/process.py,sha256=SumVj-2Q7PQ-HZBaCcpN_PY9WkIqlRuy9hRo0VCpb2A,8864
|
11
11
|
geth/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
geth/reset.py,sha256=IlKfr5PyjVi0rHjoGUY5kbjtnR9ZAsfSb1Jgzh0dDo0,2639
|
13
13
|
geth/types.py,sha256=El5Q7ZnR7d_z7jliYhbH2df1FxaKOVHgxlyD8U-qzt0,1454
|
@@ -20,8 +20,8 @@ geth/utils/proc.py,sha256=0CcHzOTkSzikrli_2ooQT6iHpPaTRYsshcvrGYC7btA,1801
|
|
20
20
|
geth/utils/thread.py,sha256=IL4C-AvzYbOwW2qOIMS63GVEqiWLe9TiMXX20qT1UaY,315
|
21
21
|
geth/utils/timeout.py,sha256=Uiz90EKJJm7UmKmVx2FhBpIblnvg9dTqszsanvfOtFM,2259
|
22
22
|
geth/utils/validation.py,sha256=YG3l98_EaweqUjElRJRxtdEldRwOz9cYii00PR74RkI,5396
|
23
|
-
py_geth-5.0.
|
24
|
-
py_geth-5.0.
|
25
|
-
py_geth-5.0.
|
26
|
-
py_geth-5.0.
|
27
|
-
py_geth-5.0.
|
23
|
+
py_geth-5.1.0.dist-info/LICENSE,sha256=kUYPqABLwavFVY_YsjHUmfvCFNnMRwMd3akYH1rHTaY,1095
|
24
|
+
py_geth-5.1.0.dist-info/METADATA,sha256=dE-BD44IZKS9pO33K6bEkz0hODrJolYQhrYoLbCN6ug,8916
|
25
|
+
py_geth-5.1.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
26
|
+
py_geth-5.1.0.dist-info/top_level.txt,sha256=o8Gvkxt3xBR7BNG2p9_G1J3GnGlTrBMEhYJBdAzBWDU,5
|
27
|
+
py_geth-5.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|