py-geth 5.0.0b2__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 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,
@@ -32,6 +39,13 @@ V1_14_2 = "v1.14.2"
32
39
  V1_14_3 = "v1.14.3"
33
40
  V1_14_4 = "v1.14.4"
34
41
  V1_14_5 = "v1.14.5"
42
+ V1_14_6 = "v1.14.6"
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"
35
49
 
36
50
 
37
51
  LINUX = "linux"
@@ -209,29 +223,27 @@ DOWNLOAD_SOURCE_CODE_URI_TEMPLATE = (
209
223
  )
210
224
 
211
225
 
212
- def download_source_code_release(identifier: str) -> int:
226
+ def download_source_code_release(identifier: str) -> None:
213
227
  download_uri = DOWNLOAD_SOURCE_CODE_URI_TEMPLATE.format(identifier)
214
228
  source_code_archive_path = get_source_code_archive_path(identifier)
215
229
 
216
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)
217
236
 
218
- command = [
219
- "wget",
220
- download_uri,
221
- "-c", # resume previously incomplete download.
222
- "-O",
223
- source_code_archive_path,
224
- ]
225
-
226
- return check_subprocess_call(
227
- command,
228
- message=f"Downloading source code release from {download_uri}",
229
- )
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
+ )
230
243
 
231
244
 
232
245
  def extract_source_code_release(identifier: str) -> None:
233
246
  source_code_archive_path = get_source_code_archive_path(identifier)
234
-
235
247
  source_code_extract_path = get_source_code_extract_path(identifier)
236
248
  ensure_path_exists(source_code_extract_path)
237
249
 
@@ -322,7 +334,13 @@ install_v1_14_2 = functools.partial(install_from_source_code_release, V1_14_2)
322
334
  install_v1_14_3 = functools.partial(install_from_source_code_release, V1_14_3)
323
335
  install_v1_14_4 = functools.partial(install_from_source_code_release, V1_14_4)
324
336
  install_v1_14_5 = functools.partial(install_from_source_code_release, V1_14_5)
325
-
337
+ install_v1_14_6 = functools.partial(install_from_source_code_release, V1_14_6)
338
+ install_v1_14_7 = functools.partial(install_from_source_code_release, V1_14_7)
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)
326
344
 
327
345
  INSTALL_FUNCTIONS = {
328
346
  LINUX: {
@@ -331,6 +349,13 @@ INSTALL_FUNCTIONS = {
331
349
  V1_14_3: install_v1_14_3,
332
350
  V1_14_4: install_v1_14_4,
333
351
  V1_14_5: install_v1_14_5,
352
+ V1_14_6: install_v1_14_6,
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,
334
359
  },
335
360
  OSX: {
336
361
  V1_14_0: install_v1_14_0,
@@ -338,6 +363,13 @@ INSTALL_FUNCTIONS = {
338
363
  V1_14_3: install_v1_14_3,
339
364
  V1_14_4: install_v1_14_4,
340
365
  V1_14_5: install_v1_14_5,
366
+ V1_14_6: install_v1_14_6,
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,
341
373
  },
342
374
  }
343
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
- _ipc_path = self.geth_kwargs.get(
190
- "ipc_path",
191
- os.path.abspath(
192
- os.path.expanduser(
193
- os.path.join(
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:
geth/types.py CHANGED
@@ -37,6 +37,7 @@ class GethKwargsTypedDict(TypedDict, total=False):
37
37
  suffix_args: list[str] | None
38
38
  suffix_kwargs: dict[str, str] | None
39
39
  tx_pool_global_slots: str | None
40
+ tx_pool_lifetime: str | None
40
41
  tx_pool_price_limit: str | None
41
42
  verbosity: str | None
42
43
  ws_addr: str | None
geth/utils/validation.py CHANGED
@@ -46,6 +46,7 @@ class GethKwargs(BaseModel):
46
46
  suffix_args: list[str] | None = None
47
47
  suffix_kwargs: dict[str, str] | None = None
48
48
  tx_pool_global_slots: str | None = None
49
+ tx_pool_lifetime: str | None = None
49
50
  tx_pool_price_limit: str | None = None
50
51
  verbosity: str | None = None
51
52
  ws_addr: str | None = None
geth/wrapper.py CHANGED
@@ -219,6 +219,9 @@ def construct_popen_command(**geth_kwargs: Unpack[GethKwargsTypedDict]) -> list[
219
219
  if gk.tx_pool_global_slots is not None:
220
220
  builder.extend(("--txpool.globalslots", gk.tx_pool_global_slots))
221
221
 
222
+ if gk.tx_pool_lifetime is not None:
223
+ builder.extend(("--txpool.lifetime", gk.tx_pool_lifetime))
224
+
222
225
  if gk.tx_pool_price_limit is not None:
223
226
  builder.extend(("--txpool.pricelimit", gk.tx_pool_price_limit))
224
227
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-geth
3
- Version: 5.0.0b2
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: semantic-version >=2.6.0
24
- Requires-Dist: pydantic >=2.6.0
25
- Requires-Dist: typing-extensions >=4.0.1
26
- Requires-Dist: eval-type-backport >=0.1.0 ; python_version < "3.10"
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 >=0.9.0 ; extra == 'dev'
29
- Requires-Dist: bumpversion >=0.5.3 ; extra == 'dev'
30
- Requires-Dist: ipython ; extra == 'dev'
31
- Requires-Dist: mypy ==1.10.0 ; extra == 'dev'
32
- Requires-Dist: pre-commit >=3.4.0 ; extra == 'dev'
33
- Requires-Dist: requests >=2.20 ; extra == 'dev'
34
- Requires-Dist: tox >=4.0.0 ; extra == 'dev'
35
- Requires-Dist: twine ; extra == 'dev'
36
- Requires-Dist: wheel ; extra == 'dev'
37
- Requires-Dist: towncrier <22,>=21 ; extra == 'dev'
38
- Requires-Dist: flaky >=3.2.0 ; extra == 'dev'
39
- Requires-Dist: pytest >=7.0.0 ; extra == 'dev'
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 <22,>=21 ; extra == 'docs'
43
+ Requires-Dist: towncrier<22,>=21; extra == "docs"
43
44
  Provides-Extra: test
44
- Requires-Dist: flaky >=3.2.0 ; extra == 'test'
45
- Requires-Dist: pytest >=7.0.0 ; extra == 'test'
46
- Requires-Dist: pytest-xdist >=2.4.0 ; extra == 'test'
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.5
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.5')
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.5` binary would be located at
180
- `$HOME/.py-geth/geth-v1.14.5/bin/geth`.
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,17 +1,17 @@
1
- geth/__init__.py,sha256=txb2SuXK0go_iQEcXYWuzJ8Rb8gq4V1i0-T_hXQNkOo,373
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=Ztrnh8vZIzfJ6lInNKlvXIneQPLW9FubsjPCJD8oXOg,10031
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=3zeHvPFhXMhotB-kOhpJlt_qxiQFTEtByAdFNVf5mlg,8966
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
- geth/types.py,sha256=IPmBhcXYXpJZuqrZiSJ5QVrf6IVG8hFsUDqaMAFjgcE,1421
14
- geth/wrapper.py,sha256=Jx1rhIguhw0TODFzlAlv0DHuilh_Uy5dDPrNotdMmCs,7774
13
+ geth/types.py,sha256=El5Q7ZnR7d_z7jliYhbH2df1FxaKOVHgxlyD8U-qzt0,1454
14
+ geth/wrapper.py,sha256=yPr0wyczd7ngLRJekIPinXyTP7cLtwyiWDTYxMlo-oU,7882
15
15
  geth/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  geth/utils/encoding.py,sha256=YguGD7mEUN2eSMPkBREalKK1VQfOsLcj1WWJLR0HTxY,1618
17
17
  geth/utils/filesystem.py,sha256=yg8m8n99-N0FA4NcNtu9V8mett2WTQPKHGjThrbk974,1320
@@ -19,9 +19,9 @@ geth/utils/networking.py,sha256=ntH6CZuGcTJJ0BIdT4rI-EMz703VDbJAJzGcxufDQMo,1488
19
19
  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
- geth/utils/validation.py,sha256=2WGKUJUJcGHKOXNlP-KE_bpIt7Tx23_BqmDkMDgGdZg,5356
23
- py_geth-5.0.0b2.dist-info/LICENSE,sha256=kUYPqABLwavFVY_YsjHUmfvCFNnMRwMd3akYH1rHTaY,1095
24
- py_geth-5.0.0b2.dist-info/METADATA,sha256=WsG1ZLqw7Ctv2asTyM-aEpRJyK8IE_Cj78zYvemf59Y,8929
25
- py_geth-5.0.0b2.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
26
- py_geth-5.0.0b2.dist-info/top_level.txt,sha256=o8Gvkxt3xBR7BNG2p9_G1J3GnGlTrBMEhYJBdAzBWDU,5
27
- py_geth-5.0.0b2.dist-info/RECORD,,
22
+ geth/utils/validation.py,sha256=YG3l98_EaweqUjElRJRxtdEldRwOz9cYii00PR74RkI,5396
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5